Permalink
Browse files

fix

  • Loading branch information...
1 parent 17d91c6 commit d1d1843242464caeba6b19796ff6153fa2b63cc0 @grosser committed Jun 15, 2013
Showing with 11 additions and 55 deletions.
  1. +1 −0 Appraisals
  2. +0 −1 Gemfile
  3. +0 −38 Gemfile.lock
  4. +1 −1 gemfiles/rails2.gemfile.lock
  5. +1 −1 gemfiles/rails3.gemfile
  6. +2 −2 gemfiles/rails3.gemfile.lock
  7. +6 −12 spec/after_initialize_spec.rb
View
@@ -4,4 +4,5 @@ end
appraise "rails3" do
gem "activerecord", "~>3.2.7"
+ gem 'railties'
end
View
@@ -7,4 +7,3 @@ gem 'bump'
gem 'rake'
gem 'rspec', '~>2'
gem 'sqlite3'
-gem 'railties'
View
@@ -7,16 +7,6 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- actionpack (3.2.13)
- activemodel (= 3.2.13)
- activesupport (= 3.2.13)
- builder (~> 3.0.0)
- erubis (~> 2.7.0)
- journey (~> 1.0.4)
- rack (~> 1.4.5)
- rack-cache (~> 1.2)
- rack-test (~> 0.6.1)
- sprockets (~> 2.2.1)
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
@@ -35,29 +25,9 @@ GEM
builder (3.0.4)
bump (0.3.5)
diff-lcs (1.1.3)
- erubis (2.7.0)
- hike (1.2.3)
i18n (0.6.1)
- journey (1.0.4)
- json (1.8.0)
multi_json (1.7.7)
- rack (1.4.5)
- rack-cache (1.2)
- rack (>= 0.4)
- rack-ssl (1.3.3)
- rack
- rack-test (0.6.2)
- rack (>= 1.0)
- railties (3.2.13)
- actionpack (= 3.2.13)
- activesupport (= 3.2.13)
- rack-ssl (~> 1.3.2)
- rake (>= 0.8.7)
- rdoc (~> 3.4)
- thor (>= 0.14.6, < 2.0)
rake (10.0.2)
- rdoc (3.12.2)
- json (~> 1.4)
rspec (2.12.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
@@ -66,14 +36,7 @@ GEM
rspec-expectations (2.12.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.12.0)
- sprockets (2.2.2)
- hike (~> 1.2)
- multi_json (~> 1.0)
- rack (~> 1.0)
- tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
- thor (0.18.1)
- tilt (1.4.1)
tzinfo (0.3.37)
PLATFORMS
@@ -83,7 +46,6 @@ DEPENDENCIES
appraisal
ar_after_transaction!
bump
- railties
rake
rspec (~> 2)
sqlite3
@@ -1,5 +1,5 @@
PATH
- remote: /Users/mmwu/ar_after_transaction
+ remote: /Users/mgrosser/code/tools/ar_after_transaction
specs:
ar_after_transaction (0.3.0)
activerecord
View
@@ -8,6 +8,6 @@ gem "rake"
gem "rspec", "~>2"
gem "sqlite3"
gem "activerecord", "~>3.2.7"
-gem "railties", "~>3.2.7"
+gem "railties"
gemspec :path=>"../"
@@ -1,5 +1,5 @@
PATH
- remote: /Users/mmwu/ar_after_transaction
+ remote: /Users/mgrosser/code/tools/ar_after_transaction
specs:
ar_after_transaction (0.3.0)
activerecord
@@ -83,7 +83,7 @@ DEPENDENCIES
appraisal
ar_after_transaction!
bump
- railties (~> 3.2.7)
+ railties
rake
rspec (~> 2)
sqlite3
@@ -1,16 +1,10 @@
require 'active_record'
require File.expand_path '../setup_database', __FILE__
-railtie = false
-
-begin
+if ActiveRecord::VERSION::MAJOR > 2
require 'action_controller/railtie'
- railtie = true
-rescue LoadError
- puts 'Railtie not loaded, skipping test'
-end
-if railtie
+ Rack::Session::Cookie
module Passthrough
def self.extended( base )
@@ -42,9 +36,9 @@ class Application < ::Rails::Application
end
end
end
-
- # Initialize the application
- ARAfterTransaction::Application.initialize!
+
+ Rack::Session::Cookie.send(:define_method, :warn){|_|} # seilence secret warning
+ ARAfterTransaction::Application.initialize! # initialize app
class AnExpectedError < Exception
end
@@ -99,4 +93,4 @@ def raise_rollback
User.test_stack.should == [:normal, :after]
end
end
-end
+end

0 comments on commit d1d1843

Please sign in to comment.