<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -396,8 +396,12 @@ module ActionDispatch
       # Delegate unhandled messages to the current session instance.
       def method_missing(sym, *args, &amp;block)
         reset! unless @integration_session
-        returning @integration_session.__send__(sym, *args, &amp;block) do
-          copy_session_variables!
+        if @integration_session.respond_to?(sym)
+          returning @integration_session.__send__(sym, *args, &amp;block) do
+            copy_session_variables!
+          end
+        else
+          super
         end
       end
     end</diff>
      <filename>actionpack/lib/action_dispatch/testing/integration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -199,6 +199,24 @@ class IntegrationTestTest &lt; 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.</diff>
      <filename>actionpack/test/controller/integration_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>316f4704eaa8aaba11e7ecebc1da9aa926fdd2d0</id>
    </parent>
  </parents>
  <author>
    <name>George Ogata</name>
    <email>george.ogata@gmail.com</email>
  </author>
  <url>http://github.com/miloops/rails/commit/3de8b44b26ecb64dc73661deb8dde1c5de92b496</url>
  <id>3de8b44b26ecb64dc73661deb8dde1c5de92b496</id>
  <committed-date>2009-10-14T15:01:42-07:00</committed-date>
  <authored-date>2009-08-30T20:46:48-07:00</authored-date>
  <message>Make IntegrationTest::Runner propagate method_missing to ancestors.

Fixes RSpec integration example groups, which mixes its Matchers
module into ActiveSupport::TestCase.

Signed-off-by: Michael Koziarski &lt;michael@koziarski.com&gt;</message>
  <tree>46604dcaae7d67dfe2a193a9e844328745bce860</tree>
  <committer>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
