summaryrefslogtreecommitdiff
path: root/spec/ruby/CONTRIBUTING.md
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/CONTRIBUTING.md')
-rw-r--r--spec/ruby/CONTRIBUTING.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/CONTRIBUTING.md b/spec/ruby/CONTRIBUTING.md
index 2f9b138372..1ec6f0ff4b 100644
--- a/spec/ruby/CONTRIBUTING.md
+++ b/spec/ruby/CONTRIBUTING.md
@@ -88,6 +88,14 @@ Array.should have_method(:new)
raise "oops"
}.should raise_error(RuntimeError, /oops/)
+-> {
+ raise "oops"
+}.should raise_error(RuntimeError) { |e|
+ # Custom checks on the Exception object
+ e.message.should include("oops")
+ e.cause.should == nil
+}
+
# To avoid! Instead, use an expectation testing what the code in the lambda does.
# If an exception is raised, it will fail the example anyway.
-> { ... }.should_not raise_error