diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-04-15 18:04:12 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-04-15 18:04:12 -0500 |
commit | 745359a49452da34978724144eaa318b8a363e08 (patch) | |
tree | 98589a0ace6838429d311e204056eda0a8b37cb7 | |
parent | 93641f30b7b2b330b28feb8d0bd49d736af3d7e9 (diff) | |
download | rails-745359a49452da34978724144eaa318b8a363e08.tar.gz rails-745359a49452da34978724144eaa318b8a363e08.tar.bz2 rails-745359a49452da34978724144eaa318b8a363e08.zip |
Stub out Dispatcher#log_failsafe_exception method to please the test gods.
-rw-r--r-- | actionpack/test/controller/dispatcher_test.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/test/controller/dispatcher_test.rb b/actionpack/test/controller/dispatcher_test.rb index 9f90872734..c4f49f1e16 100644 --- a/actionpack/test/controller/dispatcher_test.rb +++ b/actionpack/test/controller/dispatcher_test.rb @@ -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 } |