diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2014-01-26 20:39:16 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2014-01-26 21:25:54 +0000 |
commit | e3c382e3d69e7f25593cf45a4acc1b74bb93d057 (patch) | |
tree | 5cc3260c9ee723fb91e54b71ff64633e2af2deb2 /activesupport/test/json | |
parent | ef17225173131541f0f5495ea31fc51ea46cb236 (diff) | |
download | rails-e3c382e3d69e7f25593cf45a4acc1b74bb93d057.tar.gz rails-e3c382e3d69e7f25593cf45a4acc1b74bb93d057.tar.bz2 rails-e3c382e3d69e7f25593cf45a4acc1b74bb93d057.zip |
Rename subsecond_fraction_digits option to time_precision
Diffstat (limited to 'activesupport/test/json')
-rw-r--r-- | activesupport/test/json/encoding_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb index ef76d63f29..52d2708d1e 100644 --- a/activesupport/test/json/encoding_test.rb +++ b/activesupport/test/json/encoding_test.rb @@ -466,15 +466,15 @@ EXPECTED end end - def test_twz_to_json_with_custom_subsecond_resolution + def test_twz_to_json_with_custom_time_precision with_standard_json_time_format(true) do - ActiveSupport::JSON::Encoding.subsecond_fraction_digits = 0 + ActiveSupport::JSON::Encoding.time_precision = 0 zone = ActiveSupport::TimeZone['Eastern Time (US & Canada)'] time = ActiveSupport::TimeWithZone.new(Time.utc(2000), zone) assert_equal "\"1999-12-31T19:00:00-05:00\"", ActiveSupport::JSON.encode(time) end ensure - ActiveSupport::JSON::Encoding.subsecond_fraction_digits = nil + ActiveSupport::JSON::Encoding.time_precision = nil end def test_twz_to_json_when_wrapping_a_date_time |