From 8df7fe3f630e13da1585c151f6f2f986ea7dcdfd Mon Sep 17 00:00:00 2001 From: Alexey Vakhov Date: Mon, 3 Oct 2011 12:05:25 +0400 Subject: normalize arg for ActionView::TestCase tests method --- actionpack/lib/action_view/test_case.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index c4d51d7946..7df95b0cb0 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) -- cgit v1.2.3