Enable RSpec/RepeatedDescription cop & fix all issues

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedDescription
This commit is contained in:
Bertocq
2018-01-07 17:45:34 +01:00
parent e89d081a47
commit 4f6597b200
4 changed files with 7 additions and 4 deletions

View File

@@ -156,3 +156,6 @@ RSpec/OverwritingSetup:
RSpec/PredicateMatcher:
Enabled: true
RSpec/RepeatedDescription:
Enabled: true

View File

@@ -26,7 +26,7 @@ feature 'Legislation' do
context 'processes home page' do
scenario 'Processes can be listed' do
scenario 'No processes to be listed' do
visit legislation_processes_path
expect(page).to have_text "There aren't open processes"

View File

@@ -31,7 +31,7 @@ describe MigrateSpendingProposalsToInvestments do
expect(inv.heading.group.name).to eq("Toda la ciudad")
end
it "Imports a city spending proposal" do
it "Imports a district spending proposal" do
sp = create(:spending_proposal, geozone: create(:geozone, name: "Bel Air"))
inv = importer.import(sp)

View File

@@ -108,7 +108,7 @@ describe Proposal do
proposal.responsible_name = "12345678Z"
end
it "is the document_number if level two user" do
it "is the document_number if level three user" do
author = create(:user, :level_three, document_number: "12345678Z")
proposal.author = author
proposal.responsible_name = nil
@@ -854,7 +854,7 @@ describe Proposal do
expect(archived.first).to eq(archived_proposal)
end
it "scope archived" do
it "scope not archived" do
not_archived = described_class.not_archived
expect(not_archived.size).to eq(1)