diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/time_with_zone_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index 72b540efe0..774fd57ee6 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -385,6 +385,19 @@ class TimeWithZoneTest < Test::Unit::TestCase assert_equal @twz.inspect, mtime.inspect end end + + def test_freeze + @twz.freeze + assert @twz.frozen? + end + + def test_freeze_preloads_instance_variables + @twz.freeze + assert_nothing_raised do + @twz.period + @twz.time + end + end uses_mocha 'TestDatePartValueMethods' do def test_method_missing_with_non_time_return_value |