mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Stub out Dispatcher#log_failsafe_exception method to please the test gods.
This commit is contained in:
parent
93641f30b7
commit
745359a494
1 changed files with 6 additions and 3 deletions
|
@ -37,11 +37,14 @@ class DispatcherTest < Test::Unit::TestCase
|
|||
dispatch
|
||||
end
|
||||
|
||||
# Stub out dispatch error logger
|
||||
class << Dispatcher
|
||||
def log_failsafe_exception(status, exception); end
|
||||
end
|
||||
|
||||
def test_failsafe_response
|
||||
CGI.expects(:new).raises('some multipart parsing failure')
|
||||
|
||||
ActionController::Routing::Routes.stubs(:reload)
|
||||
Dispatcher.any_instance.stubs(:log_failsafe_exception)
|
||||
Dispatcher.expects(:log_failsafe_exception)
|
||||
|
||||
assert_nothing_raised { dispatch }
|
||||
|
||||
|
|
Loading…
Reference in a new issue