aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/base_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/base_test.rb')
-rw-r--r--actionpack/test/controller/base_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb
index f4517d06c4..3a4cdb81d9 100644
--- a/actionpack/test/controller/base_test.rb
+++ b/actionpack/test/controller/base_test.rb
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'logger'
require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late
# Provide some controller to run the tests on.
@@ -27,6 +28,7 @@ class EmptyController < ActionController::Base
end
class NonEmptyController < ActionController::Base
def public_action
+ render :nothing => true
end
hide_action :hidden_action
@@ -51,6 +53,7 @@ end
class DefaultUrlOptionsController < ActionController::Base
def default_url_options_action
+ render :nothing => true
end
def default_url_options(options = nil)
@@ -114,7 +117,7 @@ class PerformActionTest < ActionController::TestCase
end
def method_missing(method, *args)
- @logged << args.first
+ @logged << args.first.to_s
end
end
@@ -151,11 +154,8 @@ class PerformActionTest < ActionController::TestCase
def test_get_on_hidden_should_fail
use_controller NonEmptyController
- get :hidden_action
- assert_response 404
-
- get :another_hidden_action
- assert_response 404
+ assert_raise(ActionController::UnknownAction) { get :hidden_action }
+ assert_raise(ActionController::UnknownAction) { get :another_hidden_action }
end
def test_namespaced_action_should_log_module_name