aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-02-26 11:51:21 +0100
committerJosé Valim <jose.valim@gmail.com>2010-02-26 11:51:21 +0100
commitbd36418c512acb62c5515a6cbde79ce59dd67b46 (patch)
treeec2e66ce73454f638d6d9ab9abdac9cf55b0f3bf /actionpack/test/controller
parent4db72b702f7faca7da30a64e45daeee13733762a (diff)
downloadrails-bd36418c512acb62c5515a6cbde79ce59dd67b46.tar.gz
rails-bd36418c512acb62c5515a6cbde79ce59dd67b46.tar.bz2
rails-bd36418c512acb62c5515a6cbde79ce59dd67b46.zip
Fix controller_path returnsing an empty string in Ruby 1.8.7 [#4036 status:resolved]
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/base_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb
index 436ee212c8..207dc63d57 100644
--- a/actionpack/test/controller/base_test.rb
+++ b/actionpack/test/controller/base_test.rb
@@ -113,6 +113,15 @@ class ControllerInstanceTests < Test::Unit::TestCase
assert_equal Set.new(%w(public_action)), c.class.__send__(:action_methods), "#{c.controller_path} should not be empty!"
end
end
+
+ def test_temporary_anonymous_controllers
+ name = 'ExamplesController'
+ klass = Class.new(ActionController::Base)
+ Object.const_set(name, klass)
+
+ controller = klass.new
+ assert_equal "examples", controller.controller_path
+ end
end
class PerformActionTest < ActionController::TestCase