Skip to content

Commit c6d94cb

Browse files
committed
simplify matcher/readmer.md
1 parent d2d0e51 commit c6d94cb

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

features/matchers/README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ expect(assigns(:widget)).to be_a_new(Widget)
2828
### error reporting
2929

3030
```ruby
31-
# passes if Rails.error.report was called with any error
32-
expect { Rails.error.report(StandardError.new) }.to have_reported_error
33-
34-
# passes if Rails.error.report was called with a specific error class
35-
expect { Rails.error.report(MyError.new) }.to have_reported_error(MyError)
36-
3731
# passes if Rails.error.report was called with specific error instance and message
3832
expect { Rails.error.report(MyError.new("message")) }.to have_reported_error(MyError.new("message"))
39-
40-
# passes if Rails.error.report was called with error matching regex pattern
41-
expect { Rails.error.report(StandardError.new("test message")) }.to have_reported_error(/test/)
42-
43-
# passes if Rails.error.report was called with specific attributes
44-
expect { Rails.error.report(StandardError.new, context: "test") }.to have_reported_error.with(context: "test")
4533
```

0 commit comments

Comments
 (0)