Enable RSpec/ScatteredLet cop & fix issue

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
This commit is contained in:
Bertocq
2018-01-07 17:51:19 +01:00
parent 33365479c9
commit f8fb32db76
2 changed files with 4 additions and 3 deletions

View File

@@ -164,4 +164,7 @@ RSpec/RepeatedExample:
Enabled: true
RSpec/ReturnFromStub:
Enabled: true
RSpec/ScatteredLet:
Enabled: true

View File

@@ -7,12 +7,10 @@ describe Abilities::Valuator do
let(:user) { valuator.user }
let(:valuator) { create(:valuator) }
let(:non_assigned_investment) { create(:budget_investment) }
let(:assigned_investment) { create(:budget_investment, budget: create(:budget, phase: 'valuating')) }
before { assigned_investment.valuators << valuator }
let(:finished_assigned_investment) { create(:budget_investment, budget: create(:budget, phase: 'finished')) }
before { assigned_investment.valuators << valuator }
before { finished_assigned_investment.valuators << valuator }
it { should be_able_to(:read, SpendingProposal) }