summaryrefslogtreecommitdiff
path: root/test/json/test_json_generate.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/json/test_json_generate.rb')
-rw-r--r--test/json/test_json_generate.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/json/test_json_generate.rb b/test/json/test_json_generate.rb
index b7e0bc2..8c55a40 100644
--- a/test/json/test_json_generate.rb
+++ b/test/json/test_json_generate.rb
@@ -70,30 +70,30 @@ EOT
#assert s.check_circular
h = { 1=>2 }
h[3] = h
- assert_raises(JSON::CircularDatastructure) { generate(h) }
- assert_raises(JSON::CircularDatastructure) { generate(h, s) }
+ assert_raise(JSON::CircularDatastructure) { generate(h) }
+ assert_raise(JSON::CircularDatastructure) { generate(h, s) }
s = JSON.state.new(:check_circular => true)
#assert s.check_circular
a = [ 1, 2 ]
a << a
- assert_raises(JSON::CircularDatastructure) { generate(a, s) }
+ assert_raise(JSON::CircularDatastructure) { generate(a, s) }
end
def test_allow_nan
- assert_raises(GeneratorError) { generate([JSON::NaN]) }
+ assert_raise(GeneratorError) { generate([JSON::NaN]) }
assert_equal '[NaN]', generate([JSON::NaN], :allow_nan => true)
assert_equal '[NaN]', fast_generate([JSON::NaN])
- assert_raises(GeneratorError) { pretty_generate([JSON::NaN]) }
+ assert_raise(GeneratorError) { pretty_generate([JSON::NaN]) }
assert_equal "[\n NaN\n]", pretty_generate([JSON::NaN], :allow_nan => true)
- assert_raises(GeneratorError) { generate([JSON::Infinity]) }
+ assert_raise(GeneratorError) { generate([JSON::Infinity]) }
assert_equal '[Infinity]', generate([JSON::Infinity], :allow_nan => true)
assert_equal '[Infinity]', fast_generate([JSON::Infinity])
- assert_raises(GeneratorError) { pretty_generate([JSON::Infinity]) }
+ assert_raise(GeneratorError) { pretty_generate([JSON::Infinity]) }
assert_equal "[\n Infinity\n]", pretty_generate([JSON::Infinity], :allow_nan => true)
- assert_raises(GeneratorError) { generate([JSON::MinusInfinity]) }
+ assert_raise(GeneratorError) { generate([JSON::MinusInfinity]) }
assert_equal '[-Infinity]', generate([JSON::MinusInfinity], :allow_nan => true)
assert_equal '[-Infinity]', fast_generate([JSON::MinusInfinity])
- assert_raises(GeneratorError) { pretty_generate([JSON::MinusInfinity]) }
+ assert_raise(GeneratorError) { pretty_generate([JSON::MinusInfinity]) }
assert_equal "[\n -Infinity\n]", pretty_generate([JSON::MinusInfinity], :allow_nan => true)
end
end