From d3f0fc703ac4d133dde4cd62aa00739e38ea38fb Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 6 Mar 2018 12:09:57 +0100 Subject: [PATCH] Enable some cops to remove ambiguity --- .rubocop.yml | 4 ++-- spec/controllers/admin/profile_controller_spec.rb | 2 +- spec/controllers/api/v1/dossiers_controller_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index ba155261a..496ec6a1b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -274,10 +274,10 @@ Lint/AmbiguousBlockAssociation: Enabled: false Lint/AmbiguousOperator: - Enabled: false + Enabled: true Lint/AmbiguousRegexpLiteral: - Enabled: false + Enabled: true Lint/AssignmentInCondition: Enabled: false diff --git a/spec/controllers/admin/profile_controller_spec.rb b/spec/controllers/admin/profile_controller_spec.rb index 493fb8251..5967ed821 100644 --- a/spec/controllers/admin/profile_controller_spec.rb +++ b/spec/controllers/admin/profile_controller_spec.rb @@ -9,7 +9,7 @@ describe Admin::ProfileController, type: :controller do describe 'POST #renew_api_token' do subject { post :renew_api_token } - it { expect{ subject }.to change{ administrateur.reload.api_token } } + it { expect{ subject }.to change { administrateur.reload.api_token } } it { subject; expect(response.status).to redirect_to(admin_profile_path) } end diff --git a/spec/controllers/api/v1/dossiers_controller_spec.rb b/spec/controllers/api/v1/dossiers_controller_spec.rb index b22913982..3cd4e4f35 100644 --- a/spec/controllers/api/v1/dossiers_controller_spec.rb +++ b/spec/controllers/api/v1/dossiers_controller_spec.rb @@ -333,9 +333,9 @@ describe API::V1::DossiersController do it { expect(subject[:created_at]).not_to be_nil } if Features.remote_storage - it { expect(subject[:content_url]).to match /^https:\/\/storage.apientreprise.fr\/tps_dev\/cerfa-.*\.pdf$/ } + it { expect(subject[:content_url]).to match(/^https:\/\/storage.apientreprise.fr\/tps_dev\/cerfa-.*\.pdf$/) } else - it { expect(subject[:content_url]).to match /^http:\/\/.*downloads.*_CERFA\.pdf$/ } + it { expect(subject[:content_url]).to match(/^http:\/\/.*downloads.*_CERFA\.pdf$/) } end describe 'user' do