Enable RSpec/LetBeforeExamples cop & fix issues
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples
This commit is contained in:
@@ -114,4 +114,7 @@ RSpec/IteratedExpectation:
|
||||
Enabled: true
|
||||
|
||||
RSpec/LeadingSubject:
|
||||
Enabled: true
|
||||
|
||||
RSpec/LetBeforeExamples:
|
||||
Enabled: true
|
||||
@@ -3,9 +3,6 @@ require 'sessions_helper'
|
||||
|
||||
feature 'Budget Investments' do
|
||||
|
||||
context "Concerns" do
|
||||
it_behaves_like 'notifiable in-app', Budget::Investment
|
||||
end
|
||||
|
||||
let(:author) { create(:user, :level_two, username: 'Isabel') }
|
||||
let(:budget) { create(:budget, name: "Big Budget") }
|
||||
@@ -21,6 +18,10 @@ feature 'Budget Investments' do
|
||||
Setting['feature.allow_images'] = nil
|
||||
end
|
||||
|
||||
context "Concerns" do
|
||||
it_behaves_like 'notifiable in-app', Budget::Investment
|
||||
end
|
||||
|
||||
scenario 'Index' do
|
||||
investments = [create(:budget_investment, heading: heading),
|
||||
create(:budget_investment, heading: heading),
|
||||
|
||||
@@ -3,14 +3,14 @@ include ActionView::Helpers::DateHelper
|
||||
|
||||
feature 'Commenting legislation questions' do
|
||||
|
||||
context "Concerns" do
|
||||
it_behaves_like 'notifiable in-app', Legislation::Question
|
||||
end
|
||||
|
||||
let(:user) { create :user, :level_two }
|
||||
let(:process) { create :legislation_process, :in_debate_phase }
|
||||
let(:legislation_question) { create :legislation_question, process: process }
|
||||
|
||||
context "Concerns" do
|
||||
it_behaves_like 'notifiable in-app', Legislation::Question
|
||||
end
|
||||
|
||||
scenario 'Index' do
|
||||
3.times { create(:comment, commentable: legislation_question) }
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ require 'rails_helper'
|
||||
|
||||
describe Budget::Group do
|
||||
|
||||
it_behaves_like "sluggable"
|
||||
|
||||
let(:budget) { create(:budget) }
|
||||
|
||||
it_behaves_like "sluggable"
|
||||
|
||||
describe "name" do
|
||||
before do
|
||||
create(:budget_group, budget: budget, name: 'object name')
|
||||
|
||||
@@ -2,11 +2,11 @@ require 'rails_helper'
|
||||
|
||||
describe Budget::Heading do
|
||||
|
||||
it_behaves_like "sluggable"
|
||||
|
||||
let(:budget) { create(:budget) }
|
||||
let(:group) { create(:budget_group, budget: budget) }
|
||||
|
||||
it_behaves_like "sluggable"
|
||||
|
||||
describe "name" do
|
||||
before do
|
||||
create(:budget_heading, group: group, name: 'object name')
|
||||
|
||||
Reference in New Issue
Block a user