diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-06-10 15:27:53 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-06-10 15:27:53 -0700 |
commit | 47ff57f6d14fe161900bf85e2d2cf6d7e21a1eb8 (patch) | |
tree | 66027df07caa23ef31a0258a94e45fbe1fcf35d7 /actionpack/test/controller | |
parent | 82a10ce9f61a02a97d85915bb5fca53730ae28c8 (diff) | |
download | rails-47ff57f6d14fe161900bf85e2d2cf6d7e21a1eb8.tar.gz rails-47ff57f6d14fe161900bf85e2d2cf6d7e21a1eb8.tar.bz2 rails-47ff57f6d14fe161900bf85e2d2cf6d7e21a1eb8.zip |
Document and clean up HideActions and Http
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/base_test.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb index 3a4cdb81d9..03fd98a85c 100644 --- a/actionpack/test/controller/base_test.rb +++ b/actionpack/test/controller/base_test.rb @@ -87,11 +87,11 @@ class ControllerInstanceTests < Test::Unit::TestCase def test_action_methods @empty_controllers.each do |c| hide_mocha_methods_from_controller(c) - assert_equal Set.new, c.__send__(:action_methods), "#{c.controller_path} should be empty!" + assert_equal Set.new, c.class.__send__(:action_methods), "#{c.controller_path} should be empty!" end @non_empty_controllers.each do |c| hide_mocha_methods_from_controller(c) - assert_equal Set.new(%w(public_action)), c.__send__(:action_methods), "#{c.controller_path} should not be empty!" + assert_equal Set.new(%w(public_action)), c.class.__send__(:action_methods), "#{c.controller_path} should not be empty!" end end @@ -145,7 +145,12 @@ class PerformActionTest < ActionController::TestCase def test_method_missing_is_not_an_action_name use_controller MethodMissingController - assert ! @controller.__send__(:action_methods).include?('method_missing') + + if defined?(ActionController::Http) + assert ! @controller.__send__(:action_method?, 'method_missing') + else + assert ! @controller.__send__(:action_methods).include?('method_missing') + end get :method_missing assert_response :success |