aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_process.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/test_process.rb')
-rw-r--r--actionpack/lib/action_controller/test_process.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb
index 405396ddae..07ef94aad2 100644
--- a/actionpack/lib/action_controller/test_process.rb
+++ b/actionpack/lib/action_controller/test_process.rb
@@ -121,7 +121,9 @@ module ActionController #:nodoc:
end
end
- class TestResponse < AbstractResponse #:nodoc:
+ # A refactoring of TestResponse to allow the same behavior to be applied
+ # to the "real" CgiResponse class in integration tests.
+ module TestResponseBehavior #:nodoc:
# the response code of the request
def response_code
headers['Status'][0,3].to_i rescue 0
@@ -251,6 +253,10 @@ module ActionController #:nodoc:
end
end
+ class TestResponse < AbstractResponse #:nodoc:
+ include TestResponseBehavior
+ end
+
class TestSession #:nodoc:
def initialize(attributes = {})
@attributes = attributes