Commit de67fae
authored
RSpec util for exceptions (#119)
Motivated initially for testing pundit unauthorized exceptions, like:
```
it { is_expected_in_block.to raise_error(Pundit::NotAuthorizedError) }
```
Which matches well with typical `is_expected` cases, like:
```
it { is_expected.to permit_all_actions }
```1 parent b6e1c86 commit de67fae
2 files changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
0 commit comments