summaryrefslogtreecommitdiff
path: root/test/psych/test_psych.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-05-10 19:09:17 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-05-10 19:09:43 +0900
commitab785b28e2f3cc879906aeaee0358c0de478499e (patch)
tree4e689da9256f3c1653117bf10cf0803276e6f6f3 /test/psych/test_psych.rb
parentbae9a21e40a65c0eaacebfd4b3c3a8de08892c74 (diff)
[ruby/psych] Use assert_raise instead of assert_raises
https://github.com/ruby/psych/commit/e6ad12b4e1
Diffstat (limited to 'test/psych/test_psych.rb')
-rw-r--r--test/psych/test_psych.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb
index 1bfa523..76a3627 100644
--- a/test/psych/test_psych.rb
+++ b/test/psych/test_psych.rb
@@ -16,7 +16,7 @@ class TestPsych < Psych::TestCase
end
def test_line_width_invalid
- assert_raises(ArgumentError) { Psych.dump('x', { :line_width => -2 }) }
+ assert_raise(ArgumentError) { Psych.dump('x', { :line_width => -2 }) }
end
def test_line_width_no_limit
@@ -61,7 +61,7 @@ class TestPsych < Psych::TestCase
end
def test_load_argument_error
- assert_raises(TypeError) do
+ assert_raise(TypeError) do
Psych.load nil
end
end
@@ -75,7 +75,7 @@ class TestPsych < Psych::TestCase
end
def test_parse_raises_on_bad_input
- assert_raises(Psych::SyntaxError) { Psych.parse("--- `") }
+ assert_raise(Psych::SyntaxError) { Psych.parse("--- `") }
end
def test_parse_with_fallback
@@ -83,7 +83,7 @@ class TestPsych < Psych::TestCase
end
def test_non_existing_class_on_deserialize
- e = assert_raises(ArgumentError) do
+ e = assert_raise(ArgumentError) do
Psych.load("--- !ruby/object:NonExistent\nfoo: 1")
end
assert_equal 'undefined class/module NonExistent', e.message
@@ -143,7 +143,7 @@ class TestPsych < Psych::TestCase
end
def test_load_stream_raises_on_bad_input
- assert_raises(Psych::SyntaxError) { Psych.load_stream("--- `") }
+ assert_raise(Psych::SyntaxError) { Psych.load_stream("--- `") }
end
def test_parse_stream
@@ -175,7 +175,7 @@ class TestPsych < Psych::TestCase
end
def test_parse_stream_raises_on_bad_input
- assert_raises(Psych::SyntaxError) { Psych.parse_stream("--- `") }
+ assert_raise(Psych::SyntaxError) { Psych.parse_stream("--- `") }
end
def test_add_builtin_type
@@ -325,7 +325,7 @@ class TestPsych < Psych::TestCase
t.write("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n")
t.close
assert_equal 0..42, Psych.safe_load_file(t.path, permitted_classes: [Range])
- assert_raises(Psych::DisallowedClass) {
+ assert_raise(Psych::DisallowedClass) {
Psych.safe_load_file(t.path)
}
}