Apply RSpec/RepeatedExample rubocop rule

This commit is contained in:
Javi Martín
2019-06-23 02:04:58 +02:00
parent 044eabd7ef
commit 969a4e21c9
4 changed files with 3 additions and 27 deletions

View File

@@ -291,9 +291,6 @@ Rails/HttpStatus:
RSpec/RepeatedDescription:
Enabled: true
RSpec/RepeatedExample:
Enabled: true
RSpec/ReturnFromStub:
Enabled: true

View File

@@ -169,6 +169,9 @@ RSpec/LetSetup:
RSpec/NotToNot:
Enabled: true
RSpec/RepeatedExample:
Enabled: true
Style/PercentLiteralDelimiters:
Enabled: true

View File

@@ -1292,24 +1292,6 @@ describe "Budget Investments" do
expect(page).not_to have_content("Local government is not competent in this matter")
end
scenario "Show (unfeasible budget investment with valuation not finished)" do
user = create(:user)
login_as(user)
investment = create(:budget_investment,
:unfeasible,
valuation_finished: false,
budget: budget,
group: group,
heading: heading,
unfeasibility_explanation: "Local government is not competent in this matter")
visit budget_investment_path(budget, id: investment.id)
expect(page).not_to have_content("Unfeasibility explanation")
expect(page).not_to have_content("Local government is not competent in this matter")
end
it_behaves_like "followable", "budget_investment", "budget_investment_path", { "budget_id": "budget_id", "id": "id" }
it_behaves_like "imageable", "budget_investment", "budget_investment_path", { "budget_id": "budget_id", "id": "id" }

View File

@@ -27,12 +27,6 @@ describe Abilities::Valuator do
should_not be_able_to(:valuate, assigned_investment)
end
it "cannot valuate an assigned investment with a finished valuation" do
assigned_investment.update(valuation_finished: true)
should_not be_able_to(:valuate, assigned_investment)
end
it { should_not be_able_to(:update, non_assigned_investment) }
it { should_not be_able_to(:valuate, non_assigned_investment) }