Permalink
Browse files

Aliased AbstractController::ActionNotFound to ActionController::Unkno…

…wnAction
  • Loading branch information...
1 parent 94ee9d2 commit 6694bd46f59eb9b9b23afbd0d9484fd87e8fe350 Yehuda Katz + Carl Lerche committed May 11, 2009
@@ -3,6 +3,9 @@ module Rails2Compatibility
# 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 @@ def render_to_body(options)
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
@@ -39,6 +39,7 @@ def process(action, parameters = nil, session = nil, flash = nil, http_method =
@request.recycle!
@response.recycle!
+ @controller.response_body = nil
@html_document = nil
@request.env['REQUEST_METHOD'] = http_method
@@ -57,9 +57,6 @@ class NotImplemented < MethodNotAllowed #:nodoc:
class UnknownController < ActionControllerError #:nodoc:
end
- class UnknownAction < ActionControllerError #:nodoc:
- end
-
class MissingFile < ActionControllerError #:nodoc:
end
@@ -1680,11 +1680,12 @@ def test_render_with_etag
@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

0 comments on commit 6694bd4

Please sign in to comment.