summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Seaton <chris.seaton@shopify.com>2020-10-07 03:13:48 +0100
committerChris Seaton <chris.seaton@shopify.com>2020-10-07 17:28:13 +0100
commitb8c1c640cd375f2e2ccca1b18bf943f80ad04816 (patch)
treefba7e360e7768522e7569a7c07bee4c72e6bfc50 /tests
parent07c34048ff758c81be9d8b30f5d63084e5e9e072 (diff)
downloadjson-b8c1c640cd375f2e2ccca1b18bf943f80ad04816.tar.gz
Fix an issue with generate_pretty and empty objects in the Ruby and Java implementations
Diffstat (limited to 'tests')
-rwxr-xr-xtests/json_generator_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/json_generator_test.rb b/tests/json_generator_test.rb
index 77b539d..2ecdc97 100755
--- a/tests/json_generator_test.rb
+++ b/tests/json_generator_test.rb
@@ -92,6 +92,11 @@ EOT
end
def test_generate_pretty
+ json = pretty_generate({})
+ assert_equal(<<'EOT'.chomp, json)
+{
+}
+EOT
json = pretty_generate(@hash)
# hashes aren't (insertion) ordered on every ruby implementation
# assert_equal(@json3, json)