Skip to content

Commit b7abda3

Browse files
committed
Use raise_error { instead of raise_error do in specs
* Both work with the latest MSpec, but `raise_error {` is far more common, so make it consistent.
1 parent d46945e commit b7abda3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spec/ruby/language/ensure_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@
7474
ensure
7575
raise "from ensure"
7676
end
77-
}.should raise_error(RuntimeError, "from ensure") do |e|
77+
}.should raise_error(RuntimeError, "from ensure") { |e|
7878
e.cause.message.should == "from block"
79-
end
79+
}
8080
end
8181
end
8282

spec/ruby/language/rescue_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,9 @@ def rescuer.===(exception)
428428
raise "from block"
429429
rescue (raise "from rescue expression")
430430
end
431-
}.should raise_error(RuntimeError, "from rescue expression") do |e|
431+
}.should raise_error(RuntimeError, "from rescue expression") { |e|
432432
e.cause.message.should == "from block"
433-
end
433+
}
434434
end
435435

436436
it "should splat the handling Error classes" do

0 commit comments

Comments
 (0)