From d5ce65bdd459783678d30e3220ab1eef15225d9b Mon Sep 17 00:00:00 2001 From: Samuelfaure Date: Sun, 7 Jul 2024 16:25:38 +0900 Subject: [PATCH] Maintenance rubocop added gem rubocop-rspec_rails as advised by rubocop also ran rubocop autocorrect --- .rubocop.yml | 1 + Gemfile | 1 + Gemfile.lock | 4 ++++ spec/controllers/api/datapass_webhooks_controller_spec.rb | 2 +- spec/controllers/api/datapass_webhooks_v2_controller_spec.rb | 2 +- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 5d0b5ebf5..41ffc3e03 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,6 +3,7 @@ require: - rubocop-rails - rubocop-capybara - rubocop-factory_bot + - rubocop-rspec_rails AllCops: NewCops: enable diff --git a/Gemfile b/Gemfile index a20a10325..bcbb5539d 100644 --- a/Gemfile +++ b/Gemfile @@ -103,6 +103,7 @@ group :development do gem 'rubocop-rspec' gem 'rubocop-capybara' gem 'rubocop-factory_bot' + gem 'rubocop-rspec_rails' gem 'better_errors' gem 'binding_of_caller' diff --git a/Gemfile.lock b/Gemfile.lock index d5e21b2b2..e47e8f3f9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -475,6 +475,9 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) rubocop-rspec (3.0.1) rubocop (~> 1.61) + rubocop-rspec_rails (2.30.0) + rubocop (~> 1.61) + rubocop-rspec (~> 3, >= 3.0.1) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) sass-rails (6.0.0) @@ -625,6 +628,7 @@ DEPENDENCIES rubocop-factory_bot rubocop-rails rubocop-rspec + rubocop-rspec_rails sass-rails (>= 6) sentry-rails sentry-ruby diff --git a/spec/controllers/api/datapass_webhooks_controller_spec.rb b/spec/controllers/api/datapass_webhooks_controller_spec.rb index 1939c0f5d..f4907546d 100644 --- a/spec/controllers/api/datapass_webhooks_controller_spec.rb +++ b/spec/controllers/api/datapass_webhooks_controller_spec.rb @@ -122,7 +122,7 @@ it 'renders 422' do subject - expect(response).to have_http_status(422) + expect(response).to have_http_status(:unprocessable_content) end end end diff --git a/spec/controllers/api/datapass_webhooks_v2_controller_spec.rb b/spec/controllers/api/datapass_webhooks_v2_controller_spec.rb index e29c136d2..1f3d47c50 100644 --- a/spec/controllers/api/datapass_webhooks_v2_controller_spec.rb +++ b/spec/controllers/api/datapass_webhooks_v2_controller_spec.rb @@ -121,7 +121,7 @@ it 'renders 422' do subject - expect(response).to have_http_status(422) + expect(response).to have_http_status(:unprocessable_content) end end end