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:
@@ -63,3 +63,6 @@ RSpec/DescribeSymbol:
|
|||||||
|
|
||||||
RSpec/DescribedClass:
|
RSpec/DescribedClass:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
RSpec/EmptyExampleGroup:
|
||||||
|
Enabled: true
|
||||||
@@ -140,6 +140,7 @@ feature 'Legislation Draft Versions' do
|
|||||||
|
|
||||||
context 'Annotations', :js do
|
context 'Annotations', :js do
|
||||||
let(:user) { create(:user) }
|
let(:user) { create(:user) }
|
||||||
|
|
||||||
background { login_as user }
|
background { login_as user }
|
||||||
|
|
||||||
scenario 'Visit as anonymous' do
|
scenario 'Visit as anonymous' do
|
||||||
@@ -218,6 +219,7 @@ feature 'Legislation Draft Versions' do
|
|||||||
context "Merged annotations", :js do
|
context "Merged annotations", :js do
|
||||||
|
|
||||||
let(:user) { create(:user) }
|
let(:user) { create(:user) }
|
||||||
|
|
||||||
background { login_as user }
|
background { login_as user }
|
||||||
|
|
||||||
scenario 'View annotations and comments in an included range' do
|
scenario 'View annotations and comments in an included range' do
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ require 'rails_helper'
|
|||||||
feature 'Legislation' do
|
feature 'Legislation' do
|
||||||
|
|
||||||
let!(:administrator) { create(:administrator).user }
|
let!(:administrator) { create(:administrator).user }
|
||||||
|
|
||||||
shared_examples "not published permissions" do |path|
|
shared_examples "not published permissions" do |path|
|
||||||
|
|
||||||
let(:not_published_process) { create(:legislation_process, :not_published, title: "Process not published") }
|
let(:not_published_process) { create(:legislation_process, :not_published, title: "Process not published") }
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ describe Abilities::Common do
|
|||||||
let(:own_spending_proposal) { create(:spending_proposal, author: user) }
|
let(:own_spending_proposal) { create(:spending_proposal, author: user) }
|
||||||
|
|
||||||
let(:own_direct_message) { create(:direct_message, sender: user) }
|
let(:own_direct_message) { create(:direct_message, sender: user) }
|
||||||
|
|
||||||
before{ user.update(residence_verified_at: Time.current, confirmed_phone: "1") }
|
before{ user.update(residence_verified_at: Time.current, confirmed_phone: "1") }
|
||||||
|
|
||||||
describe "Proposal" do
|
describe "Proposal" do
|
||||||
@@ -239,6 +240,7 @@ describe Abilities::Common do
|
|||||||
describe "when level 3 verified" do
|
describe "when level 3 verified" do
|
||||||
let(:own_spending_proposal) { create(:spending_proposal, author: user) }
|
let(:own_spending_proposal) { create(:spending_proposal, author: user) }
|
||||||
let(:own_direct_message) { create(:direct_message, sender: user) }
|
let(:own_direct_message) { create(:direct_message, sender: user) }
|
||||||
|
|
||||||
before{ user.update(verified_at: Time.current) }
|
before{ user.update(verified_at: Time.current) }
|
||||||
|
|
||||||
it { should be_able_to(:vote, Proposal) }
|
it { should be_able_to(:vote, Proposal) }
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ describe Abilities::Valuator do
|
|||||||
before(:each) { assigned_investment.valuators << valuator }
|
before(:each) { assigned_investment.valuators << valuator }
|
||||||
|
|
||||||
let(:finished_assigned_investment) { create(:budget_investment, budget: create(:budget, phase: 'finished')) }
|
let(:finished_assigned_investment) { create(:budget_investment, budget: create(:budget, phase: 'finished')) }
|
||||||
|
|
||||||
before(:each) { finished_assigned_investment.valuators << valuator }
|
before(:each) { finished_assigned_investment.valuators << valuator }
|
||||||
|
|
||||||
it { should be_able_to(:read, SpendingProposal) }
|
it { should be_able_to(:read, SpendingProposal) }
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ describe Budget do
|
|||||||
|
|
||||||
describe "investments_orders" do
|
describe "investments_orders" do
|
||||||
let(:budget) { create(:budget) }
|
let(:budget) { create(:budget) }
|
||||||
|
|
||||||
it "is random when accepting and reviewing" do
|
it "is random when accepting and reviewing" do
|
||||||
budget.phase = 'accepting'
|
budget.phase = 'accepting'
|
||||||
expect(budget.investments_orders).to eq(['random'])
|
expect(budget.investments_orders).to eq(['random'])
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ describe Debate do
|
|||||||
|
|
||||||
describe "#editable?" do
|
describe "#editable?" do
|
||||||
let(:debate) { create(:debate) }
|
let(:debate) { create(:debate) }
|
||||||
|
|
||||||
before(:each) { Setting["max_votes_for_debate_edit"] = 3 }
|
before(:each) { Setting["max_votes_for_debate_edit"] = 3 }
|
||||||
after(:each) { Setting["max_votes_for_debate_edit"] = 1000 }
|
after(:each) { Setting["max_votes_for_debate_edit"] = 1000 }
|
||||||
|
|
||||||
@@ -111,6 +112,7 @@ describe Debate do
|
|||||||
|
|
||||||
describe "#editable_by?" do
|
describe "#editable_by?" do
|
||||||
let(:debate) { create(:debate) }
|
let(:debate) { create(:debate) }
|
||||||
|
|
||||||
before(:each) { Setting["max_votes_for_debate_edit"] = 1 }
|
before(:each) { Setting["max_votes_for_debate_edit"] = 1 }
|
||||||
after(:each) { Setting["max_votes_for_debate_edit"] = 1000 }
|
after(:each) { Setting["max_votes_for_debate_edit"] = 1000 }
|
||||||
|
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ describe Proposal do
|
|||||||
|
|
||||||
describe "#editable?" do
|
describe "#editable?" do
|
||||||
let(:proposal) { create(:proposal) }
|
let(:proposal) { create(:proposal) }
|
||||||
|
|
||||||
before(:each) {Setting["max_votes_for_proposal_edit"] = 5}
|
before(:each) {Setting["max_votes_for_proposal_edit"] = 5}
|
||||||
after(:each) {Setting["max_votes_for_proposal_edit"] = 1000}
|
after(:each) {Setting["max_votes_for_proposal_edit"] = 1000}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user