changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/rescue.rb

changeset 16: 01fd3f10ae84
author: moriq@moriq.com
date: Mon Mar 10 10:13:18 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec_on_rails
1module ActionController
2 module Rescue
3 def use_rails_error_handling!
4 @use_rails_error_handling = true
5 end
6
7 def use_rails_error_handling?
8 @use_rails_error_handling ||= false
9 end
10
11 protected
12 def rescue_action_with_fast_errors(exception)
13 if use_rails_error_handling?
14 rescue_action_without_fast_errors exception
15 else
16 raise exception
17 end
18 end
19 alias_method_chain :rescue_action, :fast_errors
20 end
21end