summaryrefslogtreecommitdiff
path: root/test/psych/test_psych.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-06-07 19:21:41 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-06-07 19:21:41 +0900
commitd7146dfd7dbe370ec9b7d6fde75bf1066bf7ed57 (patch)
tree2b95df464a0282a4b4b033ca819d3751906ddc5a /test/psych/test_psych.rb
parent85b94144f2a05771f05d731e7ee06dd849756402 (diff)
Use assert_raise instead of assert_raises
Diffstat (limited to 'test/psych/test_psych.rb')
-rw-r--r--test/psych/test_psych.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb
index c9d39c5..b4c529c 100644
--- a/test/psych/test_psych.rb
+++ b/test/psych/test_psych.rb
@@ -402,13 +402,13 @@ eoyml
end
def test_safe_dump_unpermitted_class
- error = assert_raises Psych::DisallowedClass do
+ error = assert_raise Psych::DisallowedClass do
YAML.safe_dump(Object.new)
end
assert_equal "Tried to dump unspecified class: Object", error.message
hash_subclass = Class.new(Hash)
- error = assert_raises Psych::DisallowedClass do
+ error = assert_raise Psych::DisallowedClass do
YAML.safe_dump(hash_subclass.new)
end
assert_equal "Tried to dump unspecified class: #{hash_subclass.inspect}", error.message
@@ -419,7 +419,7 @@ eoyml
end
def test_safe_dump_symbols
- error = assert_raises Psych::DisallowedClass do
+ error = assert_raise Psych::DisallowedClass do
YAML.safe_dump(:foo, permitted_classes: [Symbol])
end
assert_equal "Tried to dump unspecified class: Symbol(:foo)", error.message
@@ -430,7 +430,7 @@ eoyml
def test_safe_dump_aliases
x = []
x << x
- error = assert_raises Psych::BadAlias do
+ error = assert_raise Psych::BadAlias do
YAML.safe_dump(x)
end
assert_equal "Tried to dump an aliased object", error.message