Permalink
Browse files

Updated test environment to MiniTest and Override and replaced VERSION

file with AuthlogicFacebookShim::VERSION bumping to 0.4.0.

Signed-off-by: James McCarthy <james2mccarthy@gmail.com>
  • Loading branch information...
james2m committed Nov 28, 2011
1 parent 3f5f3a3 commit 63c7e1f5c06b07067abfae68c8bcbbb21506fdad
Showing with 45 additions and 40 deletions.
  1. +0 −1 VERSION
  2. +22 −19 authlogic_facebook_shim.gemspec
  3. +3 −0 lib/authlogic_facebook_shim/version.rb
  4. +20 −20 test/test_helper.rb
View
@@ -1 +0,0 @@
-0.3.0
@@ -1,29 +1,32 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "authlogic_facebook_shim/version"
+
Gem::Specification.new do |s|
- s.name = %q{authlogic_facebook_shim}
- s.version = "0.3.3"
+ s.name = %q{authlogic_facebook_shim}
+ s.version = AuthlogicFacebookShim::VERSION
- s.required_rubygems_version = Gem::Requirement.new(">=1.2.0") if s.respond_to? :required_rubygems_version=
- s.authors = ["James McCarthy"]
- s.date = %q{2010-05-27}
- s.description = %q{Authlogic plugin to support Facebook OAuth2 javascript sessions. Currently requires koala but is easily extended for other facebook gems}
- s.email = %q{james2mccarthy@gmail.com}
+ s.authors = ["James McCarthy"]
+ s.date = %q{2011-11-26}
+ s.description = %q{Authlogic extension to support Facebook OAuth2 javascript sessions. Currently requires koala but is easily extended for other facebook api wrappers.}
+ s.email = %q{james2mccarthy@gmail.com}
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc"
]
- s.files = Dir.glob('**/*') - Dir.glob('authlogic_facebook_shim*.gem')
- s.homepage = %q{http://github.com/james2m/authlogic_facebook_shim}
- s.rdoc_options = ["--charset=UTF-8"]
+ s.files = Dir.glob('**/*') - Dir.glob('authlogic_facebook_shim*.gem')
+ s.homepage = %q{http://github.com/james2m/authlogic_facebook_shim}
+ s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.5}
- s.summary = %q{Authlogic plugin to support Facebook Javascript OAuth2 Sessions.}
- s.test_files = Dir.glob('test/**/*')
+ s.summary = %q{Authlogic extension to support Facebook Javascript OAuth2 Sessions.}
+ s.test_files = Dir.glob('test/**/*')
- s.add_runtime_dependency('authlogic', "~>2.1.3")
- s.add_development_dependency('rails', '~>2.3.5')
- s.add_development_dependency('flexmock')
- s.add_development_dependency('shoulda')
- s.add_development_dependency('sqlite3-ruby')
- s.add_development_dependency('test-unit')
+ s.add_runtime_dependency 'authlogic', '~>3.0.1'
+
+ s.add_development_dependency 'rails', '~>3.1.0'
+ s.add_development_dependency "minitest", '~>2'
+ s.add_development_dependency "override"
+ s.add_development_dependency 'sqlite3'
+ s.add_development_dependency 'koala'
end
@@ -0,0 +1,3 @@
+module AuthlogicFacebookShim
+ VERSION = "0.4.0"
+end
View
@@ -1,31 +1,31 @@
+# Load the latest minitest
+require 'rubygems'
+gem 'minitest'
+
# Load the environment
ENV['RAILS_ENV'] = 'test'
-rails_root = File.dirname(__FILE__) + '/rails_root'
-require "#{rails_root}/config/environment.rb"
+require File.expand_path("../dummy/config/environment.rb", __FILE__)
# Load the testing framework
-require 'test_help'
-require 'flexmock/test_unit'
-require "authlogic/test_case"
+require 'minitest/autorun'
+require 'rails/test_help'
+require 'authlogic/test_case'
+require 'override'
+
+if defined?(MiniTest::Unit::TestCase)
+ MiniTest::Unit::TestCase.class_eval do
+ # Mix Authlogic::TestCase into MiniTest to make activate_authlogic and controller available
+ include Authlogic::TestCase
+ # Mix Override in because it's just stubbing and expectations that feel like MiniTest
+ include Override
+ end
+end
-silence_warnings { RAILS_ENV = ENV['RAILS_ENV'] }
+Rails.backtrace_cleaner.remove_silencers!
# Run the migrations
ActiveRecord::Migration.verbose = false
-ActiveRecord::Migrator.migrate("#{RAILS_ROOT}/db/migrate")
-
-# Setup the fixtures path
-
-class ActiveSupport::TestCase #:nodoc:
- self.fixture_path = File.join(File.dirname(__FILE__), "fixtures")
- self.use_transactional_fixtures = false
- self.use_instantiated_fixtures = false
- self.pre_loaded_fixtures = false
-
- fixtures :all
- setup :activate_authlogic
-
-end
+ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
# --- Sample valid cookie hash generated with the code below
# cookie_hash = {'fbs_233423200151' => 'access_token=233423200151|6892d62675cd952ade8b3f9b-6184456410|xrNaOlTCUF0QFZrJCHmVWzTb5Mk.&expires=0&secret=339a00cdafe6959c3caa1b8004e5f8db&session_key=6892d62675cd952ade8b3f9b-6184456410&sig=19d3c9ccb5b5a55d680ed1cf18698f57&uid=6184456410'}

0 comments on commit 63c7e1f

Please sign in to comment.