diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-01-28 10:46:07 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-01-28 10:46:23 -0800 |
commit | d58398c2b5e98aad18dc72790230f338c10d145c (patch) | |
tree | 1eba9e3141478560d196474c66d2ac4b379127de /activesupport/test | |
parent | f15bbcf97ee09d431e3ad347beb3fd31a411dda2 (diff) | |
download | rails-d58398c2b5e98aad18dc72790230f338c10d145c.tar.gz rails-d58398c2b5e98aad18dc72790230f338c10d145c.tar.bz2 rails-d58398c2b5e98aad18dc72790230f338c10d145c.zip |
Ensure test sets json time format flag
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/time_with_zone_test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index 3a12100e86..d88f79ae4f 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -56,8 +56,11 @@ class TimeWithZoneTest < Test::Unit::TestCase assert_equal 'EDT', ActiveSupport::TimeWithZone.new(Time.utc(2000, 6), @time_zone).zone #dst end - def test_to_json + def test_to_json_with_use_standard_json_time_format_config_set_to_false + old, ActiveSupport.use_standard_json_time_format = ActiveSupport.use_standard_json_time_format, false assert_equal "\"1999/12/31 19:00:00 -0500\"", ActiveSupport::JSON.encode(@twz) + ensure + ActiveSupport.use_standard_json_time_format = old end def test_to_json_with_use_standard_json_time_format_config_set_to_true |