Permalink
Browse files

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.
  • Loading branch information...
1 parent e69cc35 commit 949c4291a4bffae582dc3987e8f4980ea13a2cff @spastorino spastorino committed Sep 17, 2013
Showing with 1 addition and 4 deletions.
  1. +1 −4 actionview/test/template/form_options_helper_test.rb
@@ -1,14 +1,11 @@
require 'abstract_unit'
-require 'tzinfo'
class Map < Hash
def category
"<mus>"
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

0 comments on commit 949c429

Please sign in to comment.