Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Correct and expand raise_error specs

  • Loading branch information...
commit e4b4aa7e87deaf4375d1c5476ade86642a1bc492 1 parent 821b230
@jfirebaugh jfirebaugh authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 spec/matchers/raise_error_spec.rb
View
7 spec/matchers/raise_error_spec.rb
@@ -34,7 +34,12 @@ class UnexpectedException < Exception; end
end
it "does not match when the proc raises the expected exception with an unexpected message" do
- proc = Proc.new { raise UnexpectedException, "unexpected" }
+ proc = Proc.new { raise ExpectedException, "unexpected" }
+ RaiseErrorMatcher.new(ExpectedException, "expected").matches?(proc).should == false
+ end
+
+ it "does not match when the proc does not raise an exception" do
+ proc = Proc.new {}
RaiseErrorMatcher.new(ExpectedException, "expected").matches?(proc).should == false
end
Please sign in to comment.
Something went wrong with that request. Please try again.