Sha256: 13c4bebec629f7fb2d924308642ce5598869993e42fc471de2ab5e9b4dcf2752

Contents?: true

Size: 1.26 KB

Versions: 34

Compression:

Stored size: 1.26 KB

Contents

begin
  require File.dirname(__FILE__) + '/../../../../spec/spec_helper'
rescue LoadError
  puts "You need to install rspec in your base app"
  exit
end

require File.dirname(__FILE__) + '/../app/models/twitter_auth/generic_user'

class TwitterAuth::GenericUser
  def self.table_name; 'twitter_auth_users' end
end

class User < TwitterAuth::GenericUser; end

require 'remarkable'
require File.dirname(__FILE__) + '/fixtures/factories'
require File.dirname(__FILE__) + '/fixtures/fakeweb'
require File.dirname(__FILE__) + '/fixtures/twitter'

plugin_spec_dir = File.dirname(__FILE__)
ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log")

load(File.dirname(__FILE__) + '/schema.rb')

def define_basic_user_class!
  TwitterAuth::GenericUser.send :include, TwitterAuth::BasicUser 
end

def define_oauth_user_class!
  TwitterAuth::GenericUser.send :include, TwitterAuth::OauthUser  
end

def stub_oauth!
  TwitterAuth.stub!(:config).and_return({
    'strategy' => 'oauth',
    'oauth_consumer_key' => 'testkey',
    'oauth_consumer_secret' => 'testsecret'
  })
  define_oauth_user_class!
end

def stub_basic!
  TwitterAuth.stub!(:config).and_return({
    'strategy' => 'basic',
    'encryption_key' => 'secretcode'
  })
  define_basic_user_class!
end

define_oauth_user_class!

Version data entries

34 entries across 34 versions & 4 rubygems

Version Path
mbleigh-twitter-auth-0.1.1 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.10 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.11 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.12 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.13 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.14 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.15 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.16 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.18 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.20 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.21 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.22 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.3 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.5 spec/spec_helper.rb
mbleigh-twitter-auth-0.1.8 spec/spec_helper.rb
millsb-twitter-auth-0.1.16 spec/spec_helper.rb
twitter-auth-with-mongo-mapper-0.1.1 spec/spec_helper.rb
twitter-auth-with-mongo-mapper-0.1.0 spec/spec_helper.rb
twitter-auth-with-mongo-mapper-0.0.9 spec/spec_helper.rb
twitter-auth-0.1.22 spec/spec_helper.rb