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:
@@ -108,4 +108,7 @@ RSpec/InvalidPredicateMatcher:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ItBehavesLike:
|
||||
Enabled: true
|
||||
|
||||
RSpec/IteratedExpectation:
|
||||
Enabled: true
|
||||
@@ -90,9 +90,7 @@ feature 'Moderate comments' do
|
||||
|
||||
within('.js-check') { click_on 'All' }
|
||||
|
||||
all('input[type=checkbox]').each do |checkbox|
|
||||
expect(checkbox).to be_checked
|
||||
end
|
||||
expect(all('input[type=checkbox]')).to all(be_checked)
|
||||
|
||||
within('.js-check') { click_on 'None' }
|
||||
|
||||
|
||||
@@ -99,9 +99,7 @@ feature 'Moderate debates' do
|
||||
|
||||
within('.js-check') { click_on 'All' }
|
||||
|
||||
all('input[type=checkbox]').each do |checkbox|
|
||||
expect(checkbox).to be_checked
|
||||
end
|
||||
expect(all('input[type=checkbox]')).to all(be_checked)
|
||||
|
||||
within('.js-check') { click_on 'None' }
|
||||
|
||||
|
||||
@@ -99,9 +99,7 @@ feature 'Moderate proposals' do
|
||||
|
||||
within('.js-check') { click_on 'All' }
|
||||
|
||||
all('input[type=checkbox]').each do |checkbox|
|
||||
expect(checkbox).to be_checked
|
||||
end
|
||||
expect(all('input[type=checkbox]')).to all(be_checked)
|
||||
|
||||
within('.js-check') { click_on 'None' }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user