aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-02-21 13:07:32 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-02-21 13:32:34 -0300
commit1323374333a2e3856f4a2bad7b04fdcdfce23f6f (patch)
tree61e39c931b1318435cd2b6ed24b39b7349662165 /actionpack
parentb20823ba416c263433e40380a7e042c6be36167a (diff)
downloadrails-1323374333a2e3856f4a2bad7b04fdcdfce23f6f.tar.gz
rails-1323374333a2e3856f4a2bad7b04fdcdfce23f6f.tar.bz2
rails-1323374333a2e3856f4a2bad7b04fdcdfce23f6f.zip
Fix test name and refactor fake timezones creation in form options test
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/template/form_options_helper_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb
index 04c3fd4649..b68bb159fe 100644
--- a/actionpack/test/template/form_options_helper_test.rb
+++ b/actionpack/test/template/form_options_helper_test.rb
@@ -21,10 +21,10 @@ class FormOptionsHelperTest < ActionView::TestCase
end
def setup
- @fake_timezones = %w(A B C D E).inject([]) do |zones, id|
+ @fake_timezones = %w(A B C D E).map do |id|
tz = TZInfo::Timezone.loaded_zones[id] = stub(:name => id, :to_s => id)
ActiveSupport::TimeZone.stubs(:[]).with(id).returns(tz)
- zones << tz
+ tz
end
ActiveSupport::TimeZone.stubs(:all).returns(@fake_timezones)
end
@@ -351,7 +351,7 @@ class FormOptionsHelperTest < ActionView::TestCase
)
end
- def test_time_zone_options_no_parms
+ def test_time_zone_options_no_params
opts = time_zone_options_for_select
assert_dom_equal "<option value=\"A\">A</option>\n" +
"<option value=\"B\">B</option>\n" +