diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-10-04 18:43:46 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-10-04 18:43:46 +0100 |
commit | 5e3517ea7b9fbd460f772bffc9212d882011f2bc (patch) | |
tree | b715e53185ffca19a2c7c1ea099ed8eaa1bec7e1 /actionpack/lib/action_controller/test_case.rb | |
parent | 4918e6de989a80bb2ae92183f1b4eb98c15b487f (diff) | |
download | rails-5e3517ea7b9fbd460f772bffc9212d882011f2bc.tar.gz rails-5e3517ea7b9fbd460f772bffc9212d882011f2bc.tar.bz2 rails-5e3517ea7b9fbd460f772bffc9212d882011f2bc.zip |
Ensure rescue_from handlers are respected inside tests. [#835 state:resolved]
Note : If you're not using rescue_from, you should overrider rescue_action_without_handler() method
and not rescue_action(). Afterwards, you can set request.remote_addr to a non "0.0.0.0" value for testing the
overridden behavior.
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 3e66947d5f..6a39039504 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -84,7 +84,7 @@ module ActionController module RaiseActionExceptions attr_accessor :exception - def rescue_action(e) + def rescue_action_without_handler(e) self.exception = e if request.remote_addr == "0.0.0.0" |