Enable the Layout/SpaceInsideParens cop

This commit is contained in:
gregoirenovel 2018-01-15 22:10:46 +01:00
parent b138dcd876
commit d30ea70c08
6 changed files with 11 additions and 11 deletions

View file

@ -216,7 +216,7 @@ Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Layout/SpaceInsideParens:
Enabled: false
Enabled: true
Layout/SpaceInsidePercentLiteralDelimiters:
Enabled: false

View file

@ -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)

View file

@ -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) }

View file

@ -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

View file

@ -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) }

View file

@ -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 }