summaryrefslogtreecommitdiff
path: root/test/json/test_json_generate.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-24 17:44:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-24 17:44:39 +0000
commit00b4a3f9c4aaf5aa038a9530ec515e1718ae1c42 (patch)
treeb57bc2afea00aa87978f691526dd7adc1b8a067d /test/json/test_json_generate.rb
parent48fdf59dcfbb6964d992b6f31d0eb6f023776145 (diff)
* test: assert_raises has been deprecated since a long time ago.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 b7e0bc22c6..8c55a409cd 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