|
55 | 55 | expect_offense(<<-RUBY)
|
56 | 56 | before(:each) { true }
|
57 | 57 | ^^^^^^^^^^^^^ Omit the default `:each` argument for RSpec hooks.
|
58 |
| - after(:each) { true } |
| 58 | + after(:each) { true } |
59 | 59 | ^^^^^^^^^^^^ Omit the default `:each` argument for RSpec hooks.
|
60 | 60 | around(:each) { true }
|
61 | 61 | ^^^^^^^^^^^^^ Omit the default `:each` argument for RSpec hooks.
|
62 |
| - config.after(:each) { true } |
| 62 | + config.after(:each) { true } |
63 | 63 | ^^^^^^^^^^^^^^^^^^^ Omit the default `:each` argument for RSpec hooks.
|
64 | 64 | RUBY
|
65 | 65 | end
|
|
68 | 68 | expect_offense(<<-RUBY)
|
69 | 69 | before(:example) { true }
|
70 | 70 | ^^^^^^^^^^^^^^^^ Omit the default `:example` argument for RSpec hooks.
|
71 |
| - after(:example) { true } |
| 71 | + after(:example) { true } |
72 | 72 | ^^^^^^^^^^^^^^^ Omit the default `:example` argument for RSpec hooks.
|
73 | 73 | around(:example) { true }
|
74 | 74 | ^^^^^^^^^^^^^^^^ Omit the default `:example` argument for RSpec hooks.
|
|
95 | 95 | it 'does not flag :each for hooks' do
|
96 | 96 | expect_no_offenses(<<-RUBY)
|
97 | 97 | before(:each) { true }
|
98 |
| - after(:each) { true } |
| 98 | + after(:each) { true } |
99 | 99 | around(:each) { true }
|
100 | 100 | config.before(:each) { true }
|
101 | 101 | RUBY
|
|
105 | 105 | expect_offense(<<-RUBY)
|
106 | 106 | before(:example) { true }
|
107 | 107 | ^^^^^^^^^^^^^^^^ Use `:each` for RSpec hooks.
|
108 |
| - after(:example) { true } |
| 108 | + after(:example) { true } |
109 | 109 | ^^^^^^^^^^^^^^^ Use `:each` for RSpec hooks.
|
110 | 110 | around(:example) { true }
|
111 | 111 | ^^^^^^^^^^^^^^^^ Use `:each` for RSpec hooks.
|
|
135 | 135 | it 'does not flag :example for hooks' do
|
136 | 136 | expect_no_offenses(<<-RUBY)
|
137 | 137 | before(:example) { true }
|
138 |
| - after(:example) { true } |
| 138 | + after(:example) { true } |
139 | 139 | around(:example) { true }
|
140 | 140 | config.before(:example) { true }
|
141 | 141 | RUBY
|
|
145 | 145 | expect_offense(<<-RUBY)
|
146 | 146 | before(:each) { true }
|
147 | 147 | ^^^^^^^^^^^^^ Use `:example` for RSpec hooks.
|
148 |
| - after(:each) { true } |
| 148 | + after(:each) { true } |
149 | 149 | ^^^^^^^^^^^^ Use `:example` for RSpec hooks.
|
150 | 150 | around(:each) { true }
|
151 | 151 | ^^^^^^^^^^^^^ Use `:example` for RSpec hooks.
|
|
0 commit comments