From 1313b55531af36ea645892411b6b43e224e8b7b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 10:33:08 +0000 Subject: [PATCH 1/2] Bump rspec-rails from 5.1.2 to 6.0.1 Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 5.1.2 to 6.0.1. - [Release notes](https://github.com/rspec/rspec-rails/releases) - [Changelog](https://github.com/rspec/rspec-rails/blob/main/Changelog.md) - [Commits](https://github.com/rspec/rspec-rails/compare/v5.1.2...v6.0.1) --- updated-dependencies: - dependency-name: rspec-rails dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 97d6d0dd23..dbece1b290 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -101,7 +101,7 @@ GEM activejob (6.1.7) activesupport (= 6.1.7) globalid (>= 0.3.6) - activemerchant (1.123.0) + activemerchant (1.126.0) activesupport (>= 4.2) builder (>= 2.1.2, < 4.0.0) i18n (>= 0.6.9) @@ -264,12 +264,12 @@ GEM dotenv-rails (2.8.1) dotenv (= 2.8.1) railties (>= 3.2) - erubi (1.11.0) + erubi (1.12.0) et-orbi (1.2.7) tzinfo excon (0.81.0) execjs (2.7.0) - factory_bot (6.2.0) + factory_bot (6.2.1) activesupport (>= 5.0.0) factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) @@ -417,7 +417,7 @@ GEM net-smtp (0.3.2) net-protocol nio4r (2.5.8) - nokogiri (1.13.10) + nokogiri (1.14.0) mini_portile2 (~> 2.8.0) racc (~> 1.4) oauth2 (1.4.11) @@ -475,7 +475,7 @@ GEM puma (6.0.2) nio4r (~> 2.0) raabro (1.4.0) - racc (1.6.1) + racc (1.6.2) rack (2.2.6.2) rack-mini-profiler (2.3.4) rack (>= 1.2.0) @@ -566,29 +566,29 @@ GEM roo (2.9.0) nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-core (3.10.2) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.2) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-rails (5.1.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - railties (>= 5.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) + rspec-support (~> 3.12.0) + rspec-rails (6.0.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.11) + rspec-expectations (~> 3.11) + rspec-mocks (~> 3.11) + rspec-support (~> 3.11) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.10.3) + rspec-support (3.12.0) rswag-api (2.8.0) railties (>= 3.1, < 7.1) rswag-specs (2.8.0) From d3b80b7fc9b384b393868064064f75a1c3b5fb5e Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 31 Jan 2023 15:40:33 +1100 Subject: [PATCH 2/2] Clarify expecting a hash, not keyword arguments The syntax was ambiguous and nwer version of rspec-rails catch that. --- .../spree/admin/base_controller_spec.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/spec/controllers/spree/admin/base_controller_spec.rb b/spec/controllers/spree/admin/base_controller_spec.rb index 7e53deb55e..15d763aee0 100644 --- a/spec/controllers/spree/admin/base_controller_spec.rb +++ b/spec/controllers/spree/admin/base_controller_spec.rb @@ -24,7 +24,7 @@ describe Spree::Admin::BaseController, type: :controller do it "passes a prefix to the serializer method and renders with serializer" do expect(controller).to receive(:serializer).with(prefix) { "SerializerClass" } - expect(controller).to receive(:render).with(json: data, serializer: "SerializerClass") + expect(controller).to receive(:render).with({ json: data, serializer: "SerializerClass" }) controller.send(:render_as_json, data, ams_prefix: prefix) end end @@ -34,7 +34,7 @@ describe Spree::Admin::BaseController, type: :controller do it "does not pass a prefix to the serializer method and renders with serializer" do expect(controller).to receive(:serializer).with(prefix) { "SerializerClass" } - expect(controller).to receive(:render).with(json: data, serializer: "SerializerClass") + expect(controller).to receive(:render).with({ json: data, serializer: "SerializerClass" }) controller.send(:render_as_json, data, ams_prefix: prefix) end end @@ -48,8 +48,9 @@ describe Spree::Admin::BaseController, type: :controller do it "passes a prefix to the serializer method and renders with each_serializer" do expect(controller).to receive(:serializer).with(prefix) { "SerializerClass" } - expect(controller).to receive(:render).with(json: data, - each_serializer: "SerializerClass") + expect(controller).to receive(:render).with( + { json: data, each_serializer: "SerializerClass" } + ) controller.send(:render_as_json, data, ams_prefix: prefix) end end @@ -59,8 +60,9 @@ describe Spree::Admin::BaseController, type: :controller do it "does not pass a prefix to the serializer method and renders with each_serializer" do expect(controller).to receive(:serializer).with(prefix) { "SerializerClass" } - expect(controller).to receive(:render).with(json: data, - each_serializer: "SerializerClass") + expect(controller).to receive(:render).with( + { json: data, each_serializer: "SerializerClass" } + ) controller.send(:render_as_json, data, ams_prefix: prefix) end end