From e3c382e3d69e7f25593cf45a4acc1b74bb93d057 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sun, 26 Jan 2014 20:39:16 +0000 Subject: Rename subsecond_fraction_digits option to time_precision --- activesupport/test/json/encoding_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/test') 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 -- cgit v1.2.3