diff options
author | José Valim <jose.valim@gmail.com> | 2011-10-09 02:15:19 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-10-09 02:15:19 -0700 |
commit | 501e5b0d7ff995070e66d4322ed03bd882639258 (patch) | |
tree | 10341d3a391c1fe62808b34dd7cf49323428bd8f /actionpack/lib/action_view | |
parent | bedd6dcd432f55460624455b5026d1d52c1967d4 (diff) | |
parent | 8df7fe3f630e13da1585c151f6f2f986ea7dcdfd (diff) | |
download | rails-501e5b0d7ff995070e66d4322ed03bd882639258.tar.gz rails-501e5b0d7ff995070e66d4322ed03bd882639258.tar.bz2 rails-501e5b0d7ff995070e66d4322ed03bd882639258.zip |
Merge pull request #3196 from avakhov/patch-am-av-tests-2
Improve tests method for ActionView::TestCase and ActionMailer::TestCase
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/test_case.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index 1db079d0e3..9ebe498192 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -50,7 +50,12 @@ module ActionView module ClassMethods def tests(helper_class) - self.helper_class = helper_class + case helper_class + when String, Symbol + self.helper_class = "#{helper_class.to_s.underscore}_helper".camelize.safe_constantize + when Module + self.helper_class = helper_class + end end def determine_default_helper_class(name) |