提交 949c4291 编写于 作者: S Santiago Pastorino

There's no need to do this

AS does the following inside Time.find_zone! ...
`ActiveSupport::TimeZone[time_zone] || TZInfo::Timezone.get(time_zone)`
and given that the test is stubbing AS::TZ[] we don't need the removed
code.
上级 e69cc355
require 'abstract_unit'
require 'tzinfo'
class Map < Hash
def category
......@@ -7,8 +6,6 @@ def category
end
end
TZInfo::Timezone.cattr_reader :loaded_zones
class FormOptionsHelperTest < ActionView::TestCase
tests ActionView::Helpers::FormOptionsHelper
......@@ -22,7 +19,7 @@ class FormOptionsHelperTest < ActionView::TestCase
def setup
@fake_timezones = %w(A B C D E).map do |id|
tz = TZInfo::Timezone.loaded_zones[id] = stub(:name => id, :to_s => id)
tz = stub(:name => id, :to_s => id)
ActiveSupport::TimeZone.stubs(:[]).with(id).returns(tz)
tz
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册