1
0
Fork 0
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:
Joshua Peek 2008-04-15 18:04:12 -05:00
parent 93641f30b7
commit 745359a494

View file

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