mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Stub out Dispatcher#log_failsafe_exception method to please the test gods.
This commit is contained in:
@@ -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 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user