Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't ignore call to undefined method in Sweeper

  • Loading branch information...
commit b4b0fddb24b0e6cbff6936606689984274cecd15 1 parent f0ad853
@bagilevi bagilevi authored
View
2  actionpack/lib/action_controller/caching/sweeping.rb
@@ -88,7 +88,7 @@ def callback(timing)
end
def method_missing(method, *arguments, &block)
- return unless @controller
+ super unless @controller
@controller.__send__(method, *arguments, &block)
end
end
View
16 actionpack/test/controller/sweeper_test.rb
@@ -0,0 +1,16 @@
+require 'abstract_unit'
+
+
+class SweeperTest < ActionController::TestCase
+
+ class ::AppSweeper < ActionController::Caching::Sweeper; end
+
+ def test_sweeper_should_not_ignore_unknown_method_calls
+ sweeper = ActionController::Caching::Sweeper.send(:new)
+ assert_raise NameError do
+ sweeper.instance_eval do
+ some_method_that_doesnt_exist
+ end
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.