aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-02-02 22:39:02 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-02-02 22:39:02 -0800
commit34a37ea9e8265972a93f0c4f62e44308c27751dd (patch)
treee310c148ef3f8a5ff40119b0ba41715f4c853af1
parent2259ecf368e6a6715966f69216e3ee86bf1a82a7 (diff)
downloadrails-34a37ea9e8265972a93f0c4f62e44308c27751dd.tar.gz
rails-34a37ea9e8265972a93f0c4f62e44308c27751dd.tar.bz2
rails-34a37ea9e8265972a93f0c4f62e44308c27751dd.zip
Workaround jruby issue with protected module attr_accessor showing up as public in included class
-rw-r--r--actionpack/lib/action_controller/test_case.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 0b0d0c799b..d2059d51f4 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/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