File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -30,22 +30,4 @@ expect(assigns(:widget)).to be_a_new(Widget)
30
30
``` ruby
31
31
# passes when any error is reported
32
32
expect { Rails .error.report(StandardError .new ) }.to have_reported_error
33
-
34
- # passes when specific error class is reported
35
- expect { Rails .error.report(MyError .new ) }.to have_reported_error(MyError )
36
-
37
- # passes when specific error class with exact message is reported
38
- expect { Rails .error.report(MyError .new (" message" )) }.to have_reported_error(MyError , " message" )
39
-
40
- # passes when specific error class with message matching pattern is reported
41
- expect { Rails .error.report(MyError .new (" test message" )) }.to have_reported_error(MyError , /test/ )
42
-
43
- # passes when any error with exact message is reported
44
- expect { Rails .error.report(StandardError .new (" exact message" )) }.to have_reported_error(" exact message" )
45
-
46
- # passes when any error with message matching pattern is reported
47
- expect { Rails .error.report(StandardError .new (" test message" )) }.to have_reported_error(/test/ )
48
-
49
- # passes when error is reported with specific context attributes
50
- expect { Rails .error.report(StandardError .new , context: { user_id: 123 }) }.to have_reported_error.with_context(user_id: 123 )
51
33
```
You can’t perform that action at this time.
0 commit comments