aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-11-22 17:32:27 -0500
committerNeeraj Singh <neerajdotname@gmail.com>2010-11-22 17:32:27 -0500
commit5debc65c356c619bce20dcc10c0befc7c4204ef5 (patch)
treedc32bab1eccd11bacdaff70f25696689a2b9dc66 /actionpack/lib/action_controller/test_case.rb
parent1c68e55ae5e90b7c072a1f6030ea3dd4becd8a07 (diff)
parent818b366c3e3645b3375ee0b1d1023621dbeaede2 (diff)
downloadrails-5debc65c356c619bce20dcc10c0befc7c4204ef5.tar.gz
rails-5debc65c356c619bce20dcc10c0befc7c4204ef5.tar.bz2
rails-5debc65c356c619bce20dcc10c0befc7c4204ef5.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r--actionpack/lib/action_controller/test_case.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 2b2f647d32..0f43527a56 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -1,6 +1,7 @@
require 'rack/session/abstract/id'
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/object/to_query'
+require 'active_support/core_ext/class/attribute'
module ActionController
module TemplateAssertions
@@ -325,11 +326,11 @@ module ActionController
def controller_class=(new_class)
prepare_controller_class(new_class) if new_class
- write_inheritable_attribute(:controller_class, new_class)
+ self._controller_class = new_class
end
def controller_class
- if current_controller_class = read_inheritable_attribute(:controller_class)
+ if current_controller_class = self._controller_class
current_controller_class
else
self.controller_class = determine_default_controller_class(name)
@@ -442,6 +443,7 @@ module ActionController
included do
include ActionController::TemplateAssertions
include ActionDispatch::Assertions
+ class_attribute :_controller_class
setup :setup_controller_request_and_response
end