diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index bb693c6494..b9d8d39c9c 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -347,9 +347,9 @@ module ActionController # assert_redirected_to page_url(:title => 'foo') class TestCase < ActiveSupport::TestCase - # Use AS::TestCase for the base class when describing a model + # Use AC::TestCase for the base class when describing a controller register_spec_type(self) do |desc| - Class === desc && desc < ActionController::Base + Class === desc && desc < ActionController::Metal end module Behavior @@ -391,7 +391,9 @@ module ActionController end def determine_default_controller_class(name) - name.sub(/Test$/, '').safe_constantize + determine_constant_from_test_name(name) do |constant| + Class === constant && constant < ActionController::Metal + end end def prepare_controller_class(new_class) |