From fadc02b7322c97f10d34fc04c147f3585eda1272 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Tue, 26 Nov 2013 14:05:12 -0800 Subject: Added back the `encode_big_decimal_as_string` option with warning Also added the missing CHANGELOG entry for #12183 @ 80e7552073 and 4d02296cfb. --- activesupport/test/json/encoding_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'activesupport/test/json') diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb index 79e639b508..78cf4819f9 100644 --- a/activesupport/test/json/encoding_test.rb +++ b/activesupport/test/json/encoding_test.rb @@ -172,6 +172,22 @@ class TestJSONEncoding < ActiveSupport::TestCase assert_equal "𐒑", decoded_hash['string'] end + def test_reading_encode_big_decimal_as_string_option + assert_deprecated do + assert ActiveSupport.encode_big_decimal_as_string + end + end + + def test_setting_deprecated_encode_big_decimal_as_string_option + assert_raise(NotImplementedError) do + ActiveSupport.encode_big_decimal_as_string = true + end + + assert_raise(NotImplementedError) do + ActiveSupport.encode_big_decimal_as_string = false + end + end + def test_exception_raised_when_encoding_circular_reference_in_array a = [1] a << a -- cgit v1.2.3