Don't ignore call to undefined method in Sweeper

This commit is contained in:
Levente Bagi 2012-03-06 16:24:04 +00:00
parent f0ad8532f3
commit b4b0fddb24
2 changed files with 17 additions and 1 deletions

View File

@ -88,7 +88,7 @@ module ActionController #:nodoc:
end
def method_missing(method, *arguments, &block)
return unless @controller
super unless @controller
@controller.__send__(method, *arguments, &block)
end
end

View File

@ -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