提交 2ac67358 编写于 作者: A ayaya

prevent the cache sweeper ignores NoMethodError

上级 bbd2caea
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册