Enable RSpec/NotToNot cop and fix all issues

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
This commit is contained in:
Bertocq
2018-01-07 17:39:48 +01:00
parent 79a3b97c64
commit 34bb9d65b1
143 changed files with 1041 additions and 1038 deletions

View File

@@ -141,7 +141,7 @@ module CommonActions
end
def expect_to_not_be_signed_in
expect(find('.top-bar')).to_not have_content 'My account'
expect(find('.top-bar')).not_to have_content 'My account'
end
def select_date(values, selector)
@@ -210,12 +210,12 @@ module CommonActions
def expect_message_voting_not_allowed
expect(page).to have_content 'Voting phase is closed'
expect(page).to_not have_selector('.in-favor a')
expect(page).not_to have_selector('.in-favor a')
end
def expect_message_selecting_not_allowed
expect(page).to have_content 'No Selecting Allowed'
expect(page).to_not have_selector('.in-favor a')
expect(page).not_to have_selector('.in-favor a')
end
def expect_message_organizations_cannot_vote
@@ -297,8 +297,8 @@ module CommonActions
def expect_no_badge_for(resource_name, resource)
within("##{resource_name}_#{resource.id}") do
expect(page).to_not have_css ".label.round"
expect(page).to_not have_content "Employee"
expect(page).not_to have_css ".label.round"
expect(page).not_to have_content "Employee"
end
end
@@ -314,7 +314,7 @@ module CommonActions
within("#poll_question_#{question.id}_answers") do
click_link answer.to_s
expect(page).to_not have_link(answer.to_s)
expect(page).not_to have_link(answer.to_s)
end
end

View File

@@ -8,7 +8,7 @@ shared_examples_for "verifiable" do
user2 = create(:user, verified_at: nil)
expect(model.level_three_verified).to include(user1)
expect(model.level_three_verified).to_not include(user2)
expect(model.level_three_verified).not_to include(user2)
end
end
@@ -20,8 +20,8 @@ shared_examples_for "verifiable" do
user4 = create(:user, level_two_verified_at: Time.current)
expect(model.level_two_verified).to include(user1)
expect(model.level_two_verified).to_not include(user2)
expect(model.level_two_verified).to_not include(user3)
expect(model.level_two_verified).not_to include(user2)
expect(model.level_two_verified).not_to include(user3)
expect(model.level_two_verified).to include(user4)
end
end
@@ -36,8 +36,8 @@ shared_examples_for "verifiable" do
expect(model.level_two_or_three_verified).to include(user1)
expect(model.level_two_or_three_verified).to include(user2)
expect(model.level_two_or_three_verified).to_not include(user3)
expect(model.level_two_or_three_verified).to_not include(user4)
expect(model.level_two_or_three_verified).not_to include(user3)
expect(model.level_two_or_three_verified).not_to include(user4)
expect(model.level_two_or_three_verified).to include(user5)
end
end
@@ -53,8 +53,8 @@ shared_examples_for "verifiable" do
expect(model.unverified).to include(user1)
expect(model.unverified).to include(user2)
expect(model.unverified).to include(user3)
expect(model.unverified).to_not include(user4)
expect(model.unverified).to_not include(user5)
expect(model.unverified).not_to include(user4)
expect(model.unverified).not_to include(user5)
end
end
@@ -70,8 +70,8 @@ shared_examples_for "verifiable" do
expect(model.incomplete_verification).to include(user1)
expect(model.incomplete_verification).to include(user2)
expect(model.incomplete_verification).to_not include(user3)
expect(model.incomplete_verification).to_not include(user4)
expect(model.incomplete_verification).not_to include(user3)
expect(model.incomplete_verification).not_to include(user4)
end
end
end