Fix test name and refactor fake timezones creation in form options test

This commit is contained in:
Carlos Antonio da Silva 2013-02-21 13:07:32 -03:00
parent b20823ba41
commit 1323374333

@ -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 @@ def test_optgroups_with_with_options_with_hash
)
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" +