aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/testing/test_case.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/testing/test_case.rb')
-rw-r--r--actionpack/lib/action_controller/testing/test_case.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/testing/test_case.rb b/actionpack/lib/action_controller/testing/test_case.rb
index 4f38f75f41..b020b755a0 100644
--- a/actionpack/lib/action_controller/testing/test_case.rb
+++ b/actionpack/lib/action_controller/testing/test_case.rb
@@ -127,9 +127,14 @@ module ActionController
#
# The exception is stored in the exception accessor for further inspection.
module RaiseActionExceptions
- protected
- attr_accessor :exception
+ def self.included(base)
+ base.class_eval do
+ attr_accessor :exception
+ protected :exception, :exception=
+ end
+ end
+ protected
def rescue_action_without_handler(e)
self.exception = e
@@ -141,9 +146,7 @@ module ActionController
end
end
- def setup
- setup_controller_request_and_response
- end
+ setup :setup_controller_request_and_response
@@controller_class = nil