aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/new_base/test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/new_base/test_helper.rb')
-rw-r--r--actionpack/test/new_base/test_helper.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/actionpack/test/new_base/test_helper.rb b/actionpack/test/new_base/test_helper.rb
index d29449ddc1..091fb77f9f 100644
--- a/actionpack/test/new_base/test_helper.rb
+++ b/actionpack/test/new_base/test_helper.rb
@@ -24,6 +24,14 @@ require 'pp' # require 'pp' early to prevent hidden_methods from not picking up
require 'rubygems'
require 'rack/test'
+module Rails
+ def self.env
+ x = Object.new
+ def x.test?() true end
+ x
+ end
+end
+
module ActionController
class Base2 < AbstractBase
use AbstractController::Callbacks
@@ -54,6 +62,10 @@ module ActionController
CORE_METHODS = self.public_instance_methods
end
+
+ class CompatibleBase2 < Base2
+ use ActionController::Rails2Compatibility
+ end
end
# Temporary base class
@@ -91,7 +103,7 @@ class Rack::TestCase < ActiveSupport::TestCase
end
def assert_body(body)
- assert_equal [body], last_response.body
+ assert_equal body, last_response.body
end
def self.assert_body(body)