File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
spec/rubocop/cop/rspec/rails Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 33RSpec . describe RuboCop ::Cop ::RSpec ::Rails ::HaveHttpStatus do
44 it 'registers an offense for `expect(response.status).to be 200`' do
55 expect_offense ( <<~RUBY )
6- it { expect(response.status).to be 200 }
7- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Prefer `expect(response).to have_http_status(200)` over `expect(response.status).to be 200`.
6+ it { expect(response.status).to be( 200) }
7+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Prefer `expect(response).to have_http_status(200)` over `expect(response.status).to be( 200) `.
88 RUBY
99
1010 expect_correction ( <<~RUBY )
11- it { expect(response).to have_http_status 200 }
11+ it { expect(response).to have_http_status( 200) }
1212 RUBY
1313 end
1414
2323 RUBY
2424 end
2525
26- it 'does not register an offense for `is_expected.to be 200`' do
26+ it 'does not register an offense for `is_expected.to be( 200) `' do
2727 expect_no_offenses ( <<~RUBY )
28- it { is_expected.to be 200 }
28+ it { is_expected.to be( 200) }
2929 RUBY
3030 end
3131
32- it 'does not register an offense for `expect(res.status).to be 200`' do
32+ it 'does not register an offense for `expect(res.status).to be( 200) `' do
3333 expect_no_offenses ( <<~RUBY )
34- it { expect(res.status).to be 200 }
34+ it { expect(res.status).to be( 200) }
3535 RUBY
3636 end
3737end
You can’t perform that action at this time.
0 commit comments