From 28ab79d7c579fa1d76ac868be02b38b02818428a Mon Sep 17 00:00:00 2001 From: James Harton Date: Thu, 31 Jan 2013 13:59:09 +1300 Subject: Modify TimeWithZone#as_json to return 3DP of sub-second accuracy by default, since it's allowed by the spec and is very useful. --- activesupport/test/core_ext/time_with_zone_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/test/core_ext') diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index 18eca4cd8b..c2b3676aac 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -75,7 +75,7 @@ class TimeWithZoneTest < ActiveSupport::TestCase def test_to_json_with_use_standard_json_time_format_config_set_to_true old, ActiveSupport.use_standard_json_time_format = ActiveSupport.use_standard_json_time_format, true - assert_equal "\"1999-12-31T19:00:00-05:00\"", ActiveSupport::JSON.encode(@twz) + assert_equal "\"1999-12-31T19:00:00.000-05:00\"", ActiveSupport::JSON.encode(@twz) ensure ActiveSupport.use_standard_json_time_format = old end -- cgit v1.2.3