Enables RSpec/EmptyLineAfterFinalLet cop & fixes all issues

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet
This commit is contained in:
Bertocq
2018-01-07 00:49:37 +01:00
parent 265d4d0967
commit fa017b664f
8 changed files with 13 additions and 0 deletions

View File

@@ -63,3 +63,6 @@ RSpec/DescribeSymbol:
RSpec/DescribedClass:
Enabled: true
RSpec/EmptyExampleGroup:
Enabled: true

View File

@@ -140,6 +140,7 @@ feature 'Legislation Draft Versions' do
context 'Annotations', :js do
let(:user) { create(:user) }
background { login_as user }
scenario 'Visit as anonymous' do
@@ -218,6 +219,7 @@ feature 'Legislation Draft Versions' do
context "Merged annotations", :js do
let(:user) { create(:user) }
background { login_as user }
scenario 'View annotations and comments in an included range' do

View File

@@ -3,6 +3,7 @@ require 'rails_helper'
feature 'Legislation' do
let!(:administrator) { create(:administrator).user }
shared_examples "not published permissions" do |path|
let(:not_published_process) { create(:legislation_process, :not_published, title: "Process not published") }

View File

@@ -157,6 +157,7 @@ describe Abilities::Common do
let(:own_spending_proposal) { create(:spending_proposal, author: user) }
let(:own_direct_message) { create(:direct_message, sender: user) }
before{ user.update(residence_verified_at: Time.current, confirmed_phone: "1") }
describe "Proposal" do
@@ -239,6 +240,7 @@ describe Abilities::Common do
describe "when level 3 verified" do
let(:own_spending_proposal) { create(:spending_proposal, author: user) }
let(:own_direct_message) { create(:direct_message, sender: user) }
before{ user.update(verified_at: Time.current) }
it { should be_able_to(:vote, Proposal) }

View File

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

View File

@@ -125,6 +125,7 @@ describe Budget do
describe "investments_orders" do
let(:budget) { create(:budget) }
it "is random when accepting and reviewing" do
budget.phase = 'accepting'
expect(budget.investments_orders).to eq(['random'])

View File

@@ -88,6 +88,7 @@ describe Debate do
describe "#editable?" do
let(:debate) { create(:debate) }
before(:each) { Setting["max_votes_for_debate_edit"] = 3 }
after(:each) { Setting["max_votes_for_debate_edit"] = 1000 }
@@ -111,6 +112,7 @@ describe Debate do
describe "#editable_by?" do
let(:debate) { create(:debate) }
before(:each) { Setting["max_votes_for_debate_edit"] = 1 }
after(:each) { Setting["max_votes_for_debate_edit"] = 1000 }

View File

@@ -162,6 +162,7 @@ describe Proposal do
describe "#editable?" do
let(:proposal) { create(:proposal) }
before(:each) {Setting["max_votes_for_proposal_edit"] = 5}
after(:each) {Setting["max_votes_for_proposal_edit"] = 1000}