aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/base_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-07-17 11:52:56 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-07-17 11:52:56 -0700
commit636e6b7138864ceb1e309939cd879e710b287f3e (patch)
tree2a36dfef02f706302a20bb5b2d428b32e9af97f0 /actionpack/test/controller/base_test.rb
parent842917dea0cfdf70f158a312cc1f77f769791d8c (diff)
parent99930d499e424f4560b371412e05d10476216ece (diff)
downloadrails-636e6b7138864ceb1e309939cd879e710b287f3e.tar.gz
rails-636e6b7138864ceb1e309939cd879e710b287f3e.tar.bz2
rails-636e6b7138864ceb1e309939cd879e710b287f3e.zip
Merge branch 'master' into i18n-merge
Conflicts: actionpack/lib/action_view/helpers/form_options_helper.rb activerecord/lib/active_record/validations.rb
Diffstat (limited to 'actionpack/test/controller/base_test.rb')
-rw-r--r--actionpack/test/controller/base_test.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb
index 34c0200fe8..d49cc2a9aa 100644
--- a/actionpack/test/controller/base_test.rb
+++ b/actionpack/test/controller/base_test.rb
@@ -7,6 +7,7 @@ module Submodule
end
class ContainedNonEmptyController < ActionController::Base
def public_action
+ render :nothing => true
end
hide_action :hidden_action
@@ -105,6 +106,18 @@ end
class PerformActionTest < Test::Unit::TestCase
+ class MockLogger
+ attr_reader :logged
+
+ def initialize
+ @logged = []
+ end
+
+ def method_missing(method, *args)
+ @logged << args.first
+ end
+ end
+
def use_controller(controller_class)
@controller = controller_class.new
@@ -142,6 +155,13 @@ class PerformActionTest < Test::Unit::TestCase
get :another_hidden_action
assert_response 404
end
+
+ def test_namespaced_action_should_log_module_name
+ use_controller Submodule::ContainedNonEmptyController
+ @controller.logger = MockLogger.new
+ get :public_action
+ assert_match /Processing\sSubmodule::ContainedNonEmptyController#public_action/, @controller.logger.logged[1]
+ end
end
class DefaultUrlOptionsTest < Test::Unit::TestCase