aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-14 18:25:11 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-17 10:04:37 -0200
commit1ae9e60b8a369f004d001e885ca71cb0ade2be80 (patch)
treebd2cf5b698783e5531df65900d3dd4b21ff8ccc2 /actionpack
parent6f8b1e3a8555405917e30ab8809124c247132b27 (diff)
downloadrails-1ae9e60b8a369f004d001e885ca71cb0ade2be80.tar.gz
rails-1ae9e60b8a369f004d001e885ca71cb0ade2be80.tar.bz2
rails-1ae9e60b8a369f004d001e885ca71cb0ade2be80.zip
Remove other old compatibility constants
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/compatibility.rb3
-rw-r--r--actionpack/lib/action_controller/metal/exceptions.rb2
-rw-r--r--actionpack/test/controller/base_test.rb4
-rw-r--r--actionpack/test/controller/render_test.rb12
-rw-r--r--actionpack/test/dispatch/debug_exceptions_test.rb4
-rw-r--r--actionpack/test/dispatch/show_exceptions_test.rb2
6 files changed, 12 insertions, 15 deletions
diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb
index 74e24c9321..6e8b12d379 100644
--- a/actionpack/lib/action_controller/metal/compatibility.rb
+++ b/actionpack/lib/action_controller/metal/compatibility.rb
@@ -4,9 +4,6 @@ module ActionController
# Temporary hax
included do
- ::ActionController::UnknownAction = ::AbstractController::ActionNotFound
- ::ActionController::DoubleRenderError = ::AbstractController::DoubleRenderError
-
# ROUTES TODO: This should be handled by a middleware and route generation
# should be able to handle SCRIPT_NAME
self.config.relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT']
diff --git a/actionpack/lib/action_controller/metal/exceptions.rb b/actionpack/lib/action_controller/metal/exceptions.rb
index 07024d0a9a..ece9ba3725 100644
--- a/actionpack/lib/action_controller/metal/exceptions.rb
+++ b/actionpack/lib/action_controller/metal/exceptions.rb
@@ -43,4 +43,4 @@ module ActionController
class UnknownHttpMethod < ActionControllerError #:nodoc:
end
-end \ No newline at end of file
+end
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb
index c5c48bc559..bda80d1c20 100644
--- a/actionpack/test/controller/base_test.rb
+++ b/actionpack/test/controller/base_test.rb
@@ -183,8 +183,8 @@ class PerformActionTest < ActionController::TestCase
def test_get_on_hidden_should_fail
use_controller NonEmptyController
- assert_raise(ActionController::UnknownAction) { get :hidden_action }
- assert_raise(ActionController::UnknownAction) { get :another_hidden_action }
+ assert_raise(AbstractController::ActionNotFound) { get :hidden_action }
+ assert_raise(AbstractController::ActionNotFound) { get :another_hidden_action }
end
end
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index ec26315dc7..bf04697b6a 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -54,7 +54,7 @@ class TestController < ActionController::Base
def conditional_hello_with_record
record = Struct.new(:updated_at, :cache_key).new(Time.now.utc.beginning_of_day, "foo/123")
-
+
if stale?(record)
render :action => 'hello_world'
end
@@ -891,12 +891,12 @@ class RenderTest < ActionController::TestCase
# :ported:
def test_attempt_to_access_object_method
- assert_raise(ActionController::UnknownAction, "No action responded to [clone]") { get :clone }
+ assert_raise(AbstractController::ActionNotFound, "No action responded to [clone]") { get :clone }
end
# :ported:
def test_private_methods
- assert_raise(ActionController::UnknownAction, "No action responded to [determine_layout]") { get :determine_layout }
+ assert_raise(AbstractController::ActionNotFound, "No action responded to [determine_layout]") { get :determine_layout }
end
# :ported:
@@ -1096,15 +1096,15 @@ class RenderTest < ActionController::TestCase
# :ported:
def test_double_render
- assert_raise(ActionController::DoubleRenderError) { get :double_render }
+ assert_raise(AbstractController::DoubleRenderError) { get :double_render }
end
def test_double_redirect
- assert_raise(ActionController::DoubleRenderError) { get :double_redirect }
+ assert_raise(AbstractController::DoubleRenderError) { get :double_redirect }
end
def test_render_and_redirect
- assert_raise(ActionController::DoubleRenderError) { get :render_and_redirect }
+ assert_raise(AbstractController::DoubleRenderError) { get :render_and_redirect }
end
# specify the one exception to double render rule - render_to_string followed by render
diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb
index f3dc160d7d..c3a565990e 100644
--- a/actionpack/test/dispatch/debug_exceptions_test.rb
+++ b/actionpack/test/dispatch/debug_exceptions_test.rb
@@ -24,7 +24,7 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest
when "/pass"
[404, { "X-Cascade" => "pass" }, self]
when "/not_found"
- raise ActionController::UnknownAction
+ raise AbstractController::ActionNotFound
when "/runtime_error"
raise RuntimeError
when "/method_not_allowed"
@@ -83,7 +83,7 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest
get "/not_found", {}, {'action_dispatch.show_exceptions' => true}
assert_response 404
- assert_match(/#{ActionController::UnknownAction.name}/, body)
+ assert_match(/#{AbstractController::ActionNotFound.name}/, body)
get "/method_not_allowed", {}, {'action_dispatch.show_exceptions' => true}
assert_response 405
diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb
index e9504f3524..4a6d5ddbf7 100644
--- a/actionpack/test/dispatch/show_exceptions_test.rb
+++ b/actionpack/test/dispatch/show_exceptions_test.rb
@@ -7,7 +7,7 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest
req = ActionDispatch::Request.new(env)
case req.path
when "/not_found"
- raise ActionController::UnknownAction
+ raise AbstractController::ActionNotFound
when "/method_not_allowed"
raise ActionController::MethodNotAllowed
when "/not_found_original_exception"