mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 22:45:03 +02:00
use assert_raise
This commit is contained in:
parent
e58fed128b
commit
c74039eec7
1 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,7 @@ class YARPRubyAPITest < Test::Unit::TestCase
|
|||
assert_equal 0, joined.start_offset
|
||||
assert_equal 10, joined.length
|
||||
|
||||
e = assert_raises RuntimeError do
|
||||
e = assert_rais RuntimeError do
|
||||
arg.location.join(recv.location)
|
||||
end
|
||||
assert_equal "Incompatible locations", e.message
|
||||
|
@ -47,12 +47,12 @@ class YARPRubyAPITest < Test::Unit::TestCase
|
|||
other_recv, other_args_node, _ = parse_expression("1234 + 567").child_nodes
|
||||
other_arg = other_args_node.arguments[0]
|
||||
|
||||
e = assert_raises RuntimeError do
|
||||
e = assert_rais RuntimeError do
|
||||
other_arg.location.join(recv.location)
|
||||
end
|
||||
assert_equal "Incompatible sources", e.message
|
||||
|
||||
e = assert_raises RuntimeError do
|
||||
e = assert_rais RuntimeError do
|
||||
recv.location.join(other_arg.location)
|
||||
end
|
||||
assert_equal "Incompatible sources", e.message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue