prevent the cache sweeper ignores NoMethodError

This commit is contained in:
ayaya 2012-01-13 14:17:19 +08:00
parent bbd2caeaf9
commit 2ac67358a3
2 changed files with 8 additions and 1 deletions

@ -93,7 +93,7 @@ def callback(timing)
end
def method_missing(method, *arguments, &block)
super unless @controller
return super unless @controller
@controller.__send__(method, *arguments, &block)
end
end

@ -510,6 +510,13 @@ def find_except
end
end
def test_sweeper_should_not_ignore_no_method_error
sweeper = ActionController::Caching::Sweeper.send(:new)
assert_raise NoMethodError do
sweeper.send_not_defined
end
end
def test_sweeper_should_not_block_rendering
response = test_process(SweeperTestController)
assert_equal 'hello world', response.body