Enable RSpec/IteratedExpectation cop and fix issues

Suggested refactor is only available for `.to` and not for `.not_to` :(

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation
This commit is contained in:
Bertocq
2018-01-07 02:24:24 +01:00
parent 77e6e33d35
commit eaf66e3ec1
4 changed files with 6 additions and 9 deletions

View File

@@ -108,4 +108,7 @@ RSpec/InvalidPredicateMatcher:
Enabled: true Enabled: true
RSpec/ItBehavesLike: RSpec/ItBehavesLike:
Enabled: true
RSpec/IteratedExpectation:
Enabled: true Enabled: true

View File

@@ -90,9 +90,7 @@ feature 'Moderate comments' do
within('.js-check') { click_on 'All' } within('.js-check') { click_on 'All' }
all('input[type=checkbox]').each do |checkbox| expect(all('input[type=checkbox]')).to all(be_checked)
expect(checkbox).to be_checked
end
within('.js-check') { click_on 'None' } within('.js-check') { click_on 'None' }

View File

@@ -99,9 +99,7 @@ feature 'Moderate debates' do
within('.js-check') { click_on 'All' } within('.js-check') { click_on 'All' }
all('input[type=checkbox]').each do |checkbox| expect(all('input[type=checkbox]')).to all(be_checked)
expect(checkbox).to be_checked
end
within('.js-check') { click_on 'None' } within('.js-check') { click_on 'None' }

View File

@@ -99,9 +99,7 @@ feature 'Moderate proposals' do
within('.js-check') { click_on 'All' } within('.js-check') { click_on 'All' }
all('input[type=checkbox]').each do |checkbox| expect(all('input[type=checkbox]')).to all(be_checked)
expect(checkbox).to be_checked
end
within('.js-check') { click_on 'None' } within('.js-check') { click_on 'None' }