aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/new_base/compatibility.rb13
-rw-r--r--actionpack/lib/action_controller/testing/process2.rb1
-rw-r--r--actionpack/test/abstract_unit2.rb3
-rw-r--r--actionpack/test/controller/render_test.rb5
4 files changed, 12 insertions, 10 deletions
diff --git a/actionpack/lib/action_controller/new_base/compatibility.rb b/actionpack/lib/action_controller/new_base/compatibility.rb
index 3b1a74ec0c..b6e15a4e0d 100644
--- a/actionpack/lib/action_controller/new_base/compatibility.rb
+++ b/actionpack/lib/action_controller/new_base/compatibility.rb
@@ -3,6 +3,9 @@ module ActionController
# Temporary hax
setup do
+ ::ActionController::UnknownAction = ::AbstractController::ActionNotFound
+ ::ActionController::DoubleRenderError = ::AbstractController::DoubleRenderError
+
cattr_accessor :session_options
self.send(:class_variable_set, "@@session_options", {})
@@ -31,11 +34,11 @@ module ActionController
super
end
-
- def _layout_for_name(name)
- name &&= name.sub(%r{^/?layouts/}, '')
- super
- end
+
+ def _layout_for_name(name)
+ name &&= name.sub(%r{^/?layouts/}, '')
+ super
+ end
end
end \ No newline at end of file
diff --git a/actionpack/lib/action_controller/testing/process2.rb b/actionpack/lib/action_controller/testing/process2.rb
index 67b5afb9c5..18b7335450 100644
--- a/actionpack/lib/action_controller/testing/process2.rb
+++ b/actionpack/lib/action_controller/testing/process2.rb
@@ -39,6 +39,7 @@ module ActionController
@request.recycle!
@response.recycle!
+ @controller.response_body = nil
@html_document = nil
@request.env['REQUEST_METHOD'] = http_method
diff --git a/actionpack/test/abstract_unit2.rb b/actionpack/test/abstract_unit2.rb
index b95bfa0202..680043fab0 100644
--- a/actionpack/test/abstract_unit2.rb
+++ b/actionpack/test/abstract_unit2.rb
@@ -57,9 +57,6 @@ module ActionController
class UnknownController < ActionControllerError #:nodoc:
end
- class UnknownAction < ActionControllerError #:nodoc:
- end
-
class MissingFile < ActionControllerError #:nodoc:
end
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 635b0f5342..414b84c029 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -1680,11 +1680,12 @@ class EtagRenderTest < ActionController::TestCase
@request.if_none_match = expected_etag
get :render_hello_world_from_variable
- assert_equal "304 Not Modified", @response.status
+ assert_equal 304, @response.status.to_i
+ @response = ActionController::TestResponse.new
@request.if_none_match = "\"diftag\""
get :render_hello_world_from_variable
- assert_equal "200 OK", @response.status
+ assert_equal 200, @response.status.to_i
end
def render_with_404_shouldnt_have_etag