summaryrefslogtreecommitdiff
path: root/test/json/json_generator_test.rb
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-03-27 10:16:10 +0100
committerHiroshi SHIBATA <[email protected]>2025-03-28 12:44:53 +0900
commit26e55562ce449d407c95891c8d3258e15cc9b129 (patch)
tree7e98f3be9b750f06d86ab6646405fea4388f1988 /test/json/json_generator_test.rb
parent2b9a9300ac4cb00824d59e59f6671a77cc003a1f (diff)
[ruby/json] Cleanup JSON.pretty_generate
https://github.com/ruby/json/commit/01c47a0555
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13004
Diffstat (limited to 'test/json/json_generator_test.rb')
-rwxr-xr-xtest/json/json_generator_test.rb21
1 files changed, 1 insertions, 20 deletions
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb
index 64636c12c2..05006ebd05 100755
--- a/test/json/json_generator_test.rb
+++ b/test/json/json_generator_test.rb
@@ -199,26 +199,7 @@ class JSONGeneratorTest < Test::Unit::TestCase
)
end
- def test_pretty_state
- state = JSON.create_pretty_state
- assert_equal({
- :allow_nan => false,
- :array_nl => "\n",
- :as_json => false,
- :ascii_only => false,
- :buffer_initial_length => 1024,
- :depth => 0,
- :script_safe => false,
- :strict => false,
- :indent => " ",
- :max_nesting => 100,
- :object_nl => "\n",
- :space => " ",
- :space_before => "",
- }.sort_by { |n,| n.to_s }, state.to_h.sort_by { |n,| n.to_s })
- end
-
- def test_safe_state
+ def test_state_defaults
state = JSON::State.new
assert_equal({
:allow_nan => false,