mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@875a09e
This commit is contained in:
parent
a06301b103
commit
5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions
|
@ -28,13 +28,13 @@ describe "C-API Exception function" do
|
|||
describe "rb_exc_raise" do
|
||||
it "raises passed exception" do
|
||||
runtime_error = RuntimeError.new '42'
|
||||
lambda { @s.rb_exc_raise(runtime_error) }.should raise_error(RuntimeError, '42')
|
||||
-> { @s.rb_exc_raise(runtime_error) }.should raise_error(RuntimeError, '42')
|
||||
end
|
||||
|
||||
it "raises an exception with an empty backtrace" do
|
||||
runtime_error = RuntimeError.new '42'
|
||||
runtime_error.set_backtrace []
|
||||
lambda { @s.rb_exc_raise(runtime_error) }.should raise_error(RuntimeError, '42')
|
||||
-> { @s.rb_exc_raise(runtime_error) }.should raise_error(RuntimeError, '42')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -52,7 +52,7 @@ describe "C-API Exception function" do
|
|||
end
|
||||
|
||||
it "raises a TypeError if the object is not nil or an Exception instance" do
|
||||
lambda { @s.rb_set_errinfo("error") }.should raise_error(TypeError)
|
||||
-> { @s.rb_set_errinfo("error") }.should raise_error(TypeError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue