diff --git a/.rubocop.yml b/.rubocop.yml index f4d827a1d..b7f7268ef 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -216,7 +216,7 @@ Layout/SpaceInsideArrayLiteralBrackets: Enabled: false Layout/SpaceInsideParens: - Enabled: false + Enabled: true Layout/SpaceInsidePercentLiteralDelimiters: Enabled: false diff --git a/app/models/procedure.rb b/app/models/procedure.rb index 7ca38294b..0d81f0a3a 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -220,14 +220,14 @@ class Procedure < ActiveRecord::Base end types_de_champ - .reject { |tdc| ['header_section', 'explication'].include?(tdc.type_champ ) } + .reject { |tdc| ['header_section', 'explication'].include?(tdc.type_champ) } .each do |type_de_champ| fields << field_hash(type_de_champ.libelle, 'type_de_champ', type_de_champ.id.to_s) end types_de_champ_private - .reject { |tdc| ['header_section', 'explication'].include?(tdc.type_champ ) } + .reject { |tdc| ['header_section', 'explication'].include?(tdc.type_champ) } .each do |type_de_champ| fields << field_hash(type_de_champ.libelle, 'type_de_champ_private', type_de_champ.id.to_s) diff --git a/spec/controllers/stats_controller_spec.rb b/spec/controllers/stats_controller_spec.rb index 74e912e49..625b56133 100644 --- a/spec/controllers/stats_controller_spec.rb +++ b/spec/controllers/stats_controller_spec.rb @@ -298,7 +298,7 @@ describe StatsController, type: :controller do end describe '#motivation_usage_procedure' do - let!(:dossier) { create(:dossier, processed_at: 1.week.ago, motivation: "Motivation" ) } + let!(:dossier) { create(:dossier, processed_at: 1.week.ago, motivation: "Motivation") } let!(:dossier1) { create(:dossier, processed_at: 1.week.ago, motivation: "Motivation", procedure: dossier.procedure) } let!(:dossier2) { create(:dossier, processed_at: 1.week.ago) } let!(:dossier3) { create(:dossier, processed_at: 1.week.ago) } diff --git a/spec/features/users/dossier_edition_spec.rb b/spec/features/users/dossier_edition_spec.rb index 32c972110..86d7f1708 100644 --- a/spec/features/users/dossier_edition_spec.rb +++ b/spec/features/users/dossier_edition_spec.rb @@ -12,7 +12,7 @@ feature 'As a User I want to edit a dossier I own' do context 'After sign_in, I can navigate through dossiers indexes and edit a dossier' do scenario 'After sign_in, I can see dossiers "à traiter" (default), and other indexes' do - expect(page.find('#a_traiter')['class'] ).to eq('active procedure-list-element') + expect(page.find('#a_traiter')['class']).to eq('active procedure-list-element') page.find_by_id('brouillon').click page.find_by_id('a_traiter').click page.find_by_id('en_instruction').click diff --git a/spec/helpers/dossier_link_helper_spec.rb b/spec/helpers/dossier_link_helper_spec.rb index 5613c5207..504524d5f 100644 --- a/spec/helpers/dossier_link_helper_spec.rb +++ b/spec/helpers/dossier_link_helper_spec.rb @@ -8,7 +8,7 @@ describe DossierLinkHelper do end context "when access as gestionnaire" do - let(:dossier) { create(:dossier ) } + let(:dossier) { create(:dossier) } let(:gestionnaire) { create(:gestionnaire) } before { dossier.procedure.gestionnaires << gestionnaire } @@ -17,7 +17,7 @@ describe DossierLinkHelper do end context "when access as expert" do - let(:dossier) { create(:dossier ) } + let(:dossier) { create(:dossier) } let(:gestionnaire) { create(:gestionnaire) } let!(:avis) { create(:avis, dossier: dossier, gestionnaire: gestionnaire) } diff --git a/spec/jobs/auto_archive_procedure_job_spec.rb b/spec/jobs/auto_archive_procedure_job_spec.rb index 9d44f68e8..2f92e5f2f 100644 --- a/spec/jobs/auto_archive_procedure_job_spec.rb +++ b/spec/jobs/auto_archive_procedure_job_spec.rb @@ -1,10 +1,10 @@ require 'rails_helper' RSpec.describe AutoArchiveProcedureJob, type: :job do - let!(:procedure) { create(:procedure, published_at: Time.now, archived_at: nil, auto_archive_on: nil ) } - let!(:procedure_hier) { create(:procedure, published_at: Time.now, archived_at: nil, auto_archive_on: 1.day.ago ) } - let!(:procedure_aujourdhui) { create(:procedure, published_at: Time.now, archived_at: nil, auto_archive_on: Date.today ) } - let!(:procedure_demain) { create(:procedure, published_at: Time.now, archived_at: nil, auto_archive_on: 1.day.from_now ) } + let!(:procedure) { create(:procedure, published_at: Time.now, archived_at: nil, auto_archive_on: nil) } + let!(:procedure_hier) { create(:procedure, published_at: Time.now, archived_at: nil, auto_archive_on: 1.day.ago) } + let!(:procedure_aujourdhui) { create(:procedure, published_at: Time.now, archived_at: nil, auto_archive_on: Date.today) } + let!(:procedure_demain) { create(:procedure, published_at: Time.now, archived_at: nil, auto_archive_on: 1.day.from_now) } subject { AutoArchiveProcedureJob.new.perform }