summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2015-06-13 12:55:29 +0200
committerFlorian Frank <flori@ping.de>2015-06-13 12:55:29 +0200
commit4b843b585060212e8c396073f79627bf081491db (patch)
tree4eb45ffa67e8cad4f7f7dc2a0615a678344471fb /tests
parent280005f5bc5e8e120f7ed717f7a86eaad2dae6b4 (diff)
downloadjson-4b843b585060212e8c396073f79627bf081491db.tar.gz
Remove generate restriction for […]/{…}
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_json_generate.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/test_json_generate.rb b/tests/test_json_generate.rb
index 2fe4760..79c00af 100755
--- a/tests/test_json_generate.rb
+++ b/tests/test_json_generate.rb
@@ -50,8 +50,7 @@ EOT
assert_equal('{"1":2}', json)
parsed_json = parse(json)
assert_equal({"1"=>2}, parsed_json)
- assert_raise(GeneratorError) { generate(666) }
- assert_equal '666', generate(666, :quirks_mode => true)
+ assert_equal '666', generate(666)
end
def test_generate_pretty
@@ -68,8 +67,7 @@ EOT
EOT
parsed_json = parse(json)
assert_equal({"1"=>2}, parsed_json)
- assert_raise(GeneratorError) { pretty_generate(666) }
- assert_equal '666', pretty_generate(666, :quirks_mode => true)
+ assert_equal '666', pretty_generate(666)
end
def test_generate_custom
@@ -94,8 +92,7 @@ EOT
assert_equal('{"1":2}', json)
parsed_json = parse(json)
assert_equal({"1"=>2}, parsed_json)
- assert_raise(GeneratorError) { fast_generate(666) }
- assert_equal '666', fast_generate(666, :quirks_mode => true)
+ assert_equal '666', fast_generate(666)
end
def test_own_state
@@ -108,9 +105,6 @@ EOT
assert_equal('{"1":2}', json)
parsed_json = parse(json)
assert_equal({"1"=>2}, parsed_json)
- assert_raise(GeneratorError) { generate(666, state) }
- state.quirks_mode = true
- assert state.quirks_mode?
assert_equal '666', generate(666, state)
end