summaryrefslogtreecommitdiff
path: root/test/psych/test_parser.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-11-11 20:39:22 +0900
committernagachika <nagachika@ruby-lang.org>2021-11-22 10:51:35 +0900
commit5afefe4371b19155fc4d692a5ff2616ad748e9cc (patch)
treec5c8e0394dece73dc33becd094655147e2919dcb /test/psych/test_parser.rb
parent5a6f8462dc00ae453268eb7b42b1d395b9f644f8 (diff)
Bump psych version to 3.3.2
Diffstat (limited to 'test/psych/test_parser.rb')
-rw-r--r--test/psych/test_parser.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb
index e8225dabb6..3604e7c985 100644
--- a/test/psych/test_parser.rb
+++ b/test/psych/test_parser.rb
@@ -63,7 +63,7 @@ module Psych
parser = Psych::Parser.new klass.new
2.times {
- assert_raises(RuntimeError, method.to_s) do
+ assert_raise(RuntimeError, method.to_s) do
parser.parse yaml
end
}
@@ -77,7 +77,7 @@ module Psych
end
def test_filename
- ex = assert_raises(Psych::SyntaxError) do
+ ex = assert_raise(Psych::SyntaxError) do
@parser.parse '--- `', 'omg!'
end
assert_match 'omg!', ex.message
@@ -180,7 +180,7 @@ module Psych
def o.external_encoding; nil end
def o.read len; self end
- assert_raises(TypeError) do
+ assert_raise(TypeError) do
@parser.parse o
end
end
@@ -193,23 +193,23 @@ module Psych
end
def test_syntax_error
- assert_raises(Psych::SyntaxError) do
+ assert_raise(Psych::SyntaxError) do
@parser.parse("---\n\"foo\"\n\"bar\"\n")
end
end
def test_syntax_error_twice
- assert_raises(Psych::SyntaxError) do
+ assert_raise(Psych::SyntaxError) do
@parser.parse("---\n\"foo\"\n\"bar\"\n")
end
- assert_raises(Psych::SyntaxError) do
+ assert_raise(Psych::SyntaxError) do
@parser.parse("---\n\"foo\"\n\"bar\"\n")
end
end
def test_syntax_error_has_path_for_string
- e = assert_raises(Psych::SyntaxError) do
+ e = assert_raise(Psych::SyntaxError) do
@parser.parse("---\n\"foo\"\n\"bar\"\n")
end
assert_match '(<unknown>):', e.message
@@ -219,7 +219,7 @@ module Psych
io = StringIO.new "---\n\"foo\"\n\"bar\"\n"
def io.path; "hello!"; end
- e = assert_raises(Psych::SyntaxError) do
+ e = assert_raise(Psych::SyntaxError) do
@parser.parse(io)
end
assert_match "(#{io.path}):", e.message