Updated to latest rspec
[gitorious:georgyos-clone.git] / vendor / plugins / rspec-rails / lib / spec / rails / extensions / action_controller / rescue.rb
1 module 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
21 end