Enable the Layout/IndentArray cop

This commit is contained in:
gregoirenovel 2018-01-15 18:54:57 +01:00
parent 5125cf8396
commit 9e0e553f80
10 changed files with 129 additions and 128 deletions

View file

@ -98,7 +98,8 @@ Layout/FirstParameterIndentation:
Enabled: true
Layout/IndentArray:
Enabled: false
Enabled: true
EnforcedStyle: consistent
Layout/IndentAssignment:
Enabled: false

View file

@ -68,7 +68,7 @@ set :shared_paths, [
'config/github_secrets.yml',
'config/initializers/mailjet.rb',
'config/initializers/storage_url.rb'
]
]
set :rbenv_path, "/usr/local/rbenv/bin/rbenv"

View file

@ -132,7 +132,8 @@ describe API::V1::DossiersController do
it { expect(subject.keys).to match_array(field_list) }
describe 'entreprise' do
let(:field_list) { [
let(:field_list) {
[
:siren,
:capital_social,
:numero_tva_intracommunautaire,
@ -144,7 +145,8 @@ describe API::V1::DossiersController do
:code_effectif_entreprise,
:date_creation,
:nom,
:prenom]
:prenom
]
}
subject { super()[:entreprise] }
@ -162,11 +164,7 @@ describe API::V1::DossiersController do
end
describe 'types_de_piece_justificative' do
let(:field_list) { [
:id,
:libelle,
:description]
}
let(:field_list) { [:id, :libelle, :description] }
subject { super()[:types_de_piece_justificative] }
it { expect(subject.length).to eq 2 }
@ -185,9 +183,7 @@ describe API::V1::DossiersController do
create :piece_justificative, :rib, dossier: dossier, type_de_piece_justificative: dossier.procedure.types_de_piece_justificative.first, user: dossier.user
end
let(:field_list) { [
:url, :created_at, :type_de_piece_justificative_id]
}
let(:field_list) { [:url, :created_at, :type_de_piece_justificative_id] }
subject { super()[:pieces_justificatives].first }
it { expect(subject.keys.include?(:content_url)).to be_truthy }
@ -204,8 +200,7 @@ describe API::V1::DossiersController do
end
describe 'champs' do
let(:field_list) { [
:url]
let(:field_list) { [:url]
}
subject { super()[:champs] }
@ -218,12 +213,14 @@ describe API::V1::DossiersController do
it { expect(subject.keys.include?(:type_de_champ)).to be_truthy }
describe 'type de champ' do
let(:field_list) { [
let(:field_list) {
[
:id,
:libelle,
:description,
:order_place,
:type]
:type
]
}
subject { super()[:type_de_champ] }
@ -277,9 +274,7 @@ describe API::V1::DossiersController do
end
describe 'champs_private' do
let(:field_list) { [
:url]
}
let(:field_list) { [:url] }
subject { super()[:champs_private] }
it { expect(subject.length).to eq 1 }
@ -291,12 +286,14 @@ describe API::V1::DossiersController do
it { expect(subject.keys.include?(:type_de_champ)).to be_truthy }
describe 'type de champ' do
let(:field_list) { [
let(:field_list) {
[
:id,
:libelle,
:description,
:order_place,
:type]
:type
]
}
subject { super()[:type_de_champ] }
@ -343,9 +340,7 @@ describe API::V1::DossiersController do
end
describe 'user' do
let(:field_list) { [
:url, :created_at, :type_de_piece_justificative_id]
}
let(:field_list) { [:url, :created_at, :type_de_piece_justificative_id] }
subject { super()[:user] }
it { expect(subject[:email]).not_to be_nil }
@ -353,7 +348,8 @@ describe API::V1::DossiersController do
end
describe 'etablissement' do
let(:field_list) { [
let(:field_list) {
[
:siret,
:siege_social,
:naf,

View file

@ -18,11 +18,12 @@ describe StatsController, type: :controller do
subject { @controller.send(:last_four_months_hash, association, :updated_at) }
it { expect(subject).to match_array([
it do
expect(subject).to match_array([
[I18n.l(62.days.ago.beginning_of_month, format: "%B %Y"), 2],
[I18n.l(31.days.ago.beginning_of_month, format: "%B %Y"), 1]
])
}
end
end
context "while a super admin is logged in" do
@ -41,11 +42,12 @@ describe StatsController, type: :controller do
subject { @controller.send(:last_four_months_hash, association, :updated_at) }
it { expect(subject).to eq([
it do
expect(subject).to eq([
[I18n.l(45.days.ago.beginning_of_month, format: "%B %Y"), 1],
[I18n.l(1.days.ago.beginning_of_month, format: "%B %Y"), 2]
])
}
end
end
end

View file

@ -23,7 +23,9 @@ describe CARTO::SGMAP::Cadastre::Adapter do
subject { adapter.filter_properties adapter.data_source }
it { expect(subject.size).to eq 9 }
it { expect(subject.keys).to eq [
it do
expect(subject.keys).to eq
[
:surface_intersection,
:surface_parcelle,
:numero,
@ -34,7 +36,7 @@ describe CARTO::SGMAP::Cadastre::Adapter do
:code_com,
:code_arr
]
}
end
end
describe 'Attributes' do