diff --git a/features/built_in_matchers/raise_error.feature b/features/built_in_matchers/raise_error.feature index 5eb18ad68..14cb150eb 100644 --- a/features/built_in_matchers/raise_error.feature +++ b/features/built_in_matchers/raise_error.feature @@ -27,6 +27,9 @@ Feature: `raise_error` matcher expect { raise "oops" }.to raise_error(RuntimeError, "oops") expect { raise "oops" }.to raise_error(RuntimeError, /op/) expect { raise "oops" }.to raise_error(an_instance_of(RuntimeError).and having_attributes(message: "oops")) + expect { raise "oops" }.to raise_error(MyError) do |exception| + expect(exception.whatever).to match(/op/) + end ``` Scenario: Expecting any error