diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-04 18:42:40 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-04 18:42:40 -0300 |
commit | 9644cdcd3deec97a48fcfa53ce75a281e8ff75fa (patch) | |
tree | 2f0090444a4911cc9845c4abd4f1528954c9cf01 /activesupport/test | |
parent | cf6b13b2be78c5728b23f8a69aad0bf6eaee5fcb (diff) | |
parent | ab4c900656db249caa6ff363a932168695b9021e (diff) | |
download | rails-9644cdcd3deec97a48fcfa53ce75a281e8ff75fa.tar.gz rails-9644cdcd3deec97a48fcfa53ce75a281e8ff75fa.tar.bz2 rails-9644cdcd3deec97a48fcfa53ce75a281e8ff75fa.zip |
Merge pull request #18328 from brainopia/remove_tz_proxy
Use directly TZInfo::Timezone without proxy
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/time_zone_test.rb | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb index 3e6d9652bb..cd7e184cda 100644 --- a/activesupport/test/time_zone_test.rb +++ b/activesupport/test/time_zone_test.rb @@ -395,15 +395,10 @@ class TimeZoneTest < ActiveSupport::TestCase assert_raise(ArgumentError) { ActiveSupport::TimeZone[false] } end - def test_unknown_zone_should_have_tzinfo_but_exception_on_utc_offset - zone = ActiveSupport::TimeZone.create("bogus") - assert_instance_of TZInfo::TimezoneProxy, zone.tzinfo - assert_raise(TZInfo::InvalidTimezoneIdentifier) { zone.utc_offset } - end - - def test_unknown_zone_with_utc_offset - zone = ActiveSupport::TimeZone.create("bogus", -21_600) - assert_equal(-21_600, zone.utc_offset) + def test_unknown_zone_raises_exception + assert_raise TZInfo::InvalidTimezoneIdentifier do + ActiveSupport::TimeZone.create("bogus") + end end def test_unknown_zones_dont_store_mapping_keys |