Permalink
Browse files

Merge pull request #5357 from bagilevi/sweeper-undefined-method-ignored

Don't ignore call to undefined method in Sweeper
  • Loading branch information...
2 parents 25861e2 + b4b0fdd commit 1efeb072bf39c3eeef9a0d8874e58a4bd9850db6 @drogus drogus committed Mar 14, 2012
@@ -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
@@ -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

0 comments on commit 1efeb07

Please sign in to comment.