diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-05 01:56:58 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-05 01:56:58 +0000 |
commit | 12ab93b72b4f98fb2e6ce9102ff9fb2cdb6c992b (patch) | |
tree | 59ad24583f5ec735f2c569d043d37d1c65006459 /actionpack/test/controller | |
parent | 604eb8ab9555da2c539fa8448625593013de3a00 (diff) | |
download | rails-12ab93b72b4f98fb2e6ce9102ff9fb2cdb6c992b.tar.gz rails-12ab93b72b4f98fb2e6ce9102ff9fb2cdb6c992b.tar.bz2 rails-12ab93b72b4f98fb2e6ce9102ff9fb2cdb6c992b.zip |
Make controller_path available as an instance method. Closes #5724.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/base_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb index 1a4afcf521..588b9f60af 100644 --- a/actionpack/test/controller/base_test.rb +++ b/actionpack/test/controller/base_test.rb @@ -36,7 +36,9 @@ end class ControllerClassTests < Test::Unit::TestCase def test_controller_path assert_equal 'empty', EmptyController.controller_path + assert_equal EmptyController.controller_path, EmptyController.new.controller_path assert_equal 'submodule/contained_empty', Submodule::ContainedEmptyController.controller_path + assert_equal Submodule::ContainedEmptyController.controller_path, Submodule::ContainedEmptyController.new.controller_path end def test_controller_name assert_equal 'empty', EmptyController.controller_name @@ -56,10 +58,10 @@ class ControllerInstanceTests < Test::Unit::TestCase def test_action_methods @empty_controllers.each do |c| - assert_equal Set.new, c.send(:action_methods), "#{c.class.controller_path} should be empty!" + assert_equal Set.new, c.send(:action_methods), "#{c.controller_path} should be empty!" end @non_empty_controllers.each do |c| - assert_equal Set.new('public_action'), c.send(:action_methods), "#{c.class.controller_path} should not be empty!" + assert_equal Set.new('public_action'), c.send(:action_methods), "#{c.controller_path} should not be empty!" end end end |