diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-10-14 17:24:17 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-10-14 17:24:17 -0700 |
commit | 5ad0e315e41d73aa5dcd8973f38dd99a5384e5ac (patch) | |
tree | c56a5b7dbafee9719b1aabc2fc5da87f17ebf554 /actionpack/test/controller/integration_test.rb | |
parent | 4cbd3f050b5db2a1164b1071753d72bea7234ff0 (diff) | |
parent | bf9819f73d74e19052b7b8a7a9885972a27e8876 (diff) | |
download | rails-5ad0e315e41d73aa5dcd8973f38dd99a5384e5ac.tar.gz rails-5ad0e315e41d73aa5dcd8973f38dd99a5384e5ac.tar.bz2 rails-5ad0e315e41d73aa5dcd8973f38dd99a5384e5ac.zip |
Merge branch 'master' into arel
Diffstat (limited to 'actionpack/test/controller/integration_test.rb')
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index 508364d0b5..fe95fb5750 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -199,6 +199,24 @@ class IntegrationTestTest < Test::Unit::TestCase assert_equal ::ActionController::Integration::Session, session2.class assert_not_equal session1, session2 end + + # RSpec mixes Matchers (which has a #method_missing) into + # IntegrationTest's superclass. Make sure IntegrationTest does not + # try to delegate these methods to the session object. + def test_does_not_prevent_method_missing_passing_up_to_ancestors + mixin = Module.new do + def method_missing(name, *args) + name.to_s == 'foo' ? 'pass' : super + end + end + @test.class.superclass.__send__(:include, mixin) + begin + assert_equal 'pass', @test.foo + ensure + # leave other tests as unaffected as possible + mixin.__send__(:remove_method, :method_missing) + end + end end # Tests that integration tests don't call Controller test methods for processing. |