prevent the cache sweeper ignores NoMethodError
This commit is contained in:
parent
bbd2caeaf9
commit
2ac67358a3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user