From d5c1da74a9e215319db675320f240c63c5ab955b Mon Sep 17 00:00:00 2001 From: msuzoagu Date: Wed, 12 Jul 2023 14:09:40 -0400 Subject: [PATCH] test: Wrap argument expection in curly brackets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit body: Ruby 3.x keyword arguments (“kwargs”) are a first-class concept in Ruby 3.x onwards thus need to make it clear to Ruby/Rspec that arg is an actual hash not keyword argument. footer: - See [rspec/rspec-mocks#1460](https://github.com/rspec/rspec-mocks/issues/1460) --- spec/codelog/command/step/version_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/codelog/command/step/version_spec.rb b/spec/codelog/command/step/version_spec.rb index 81b53db..9d18779 100644 --- a/spec/codelog/command/step/version_spec.rb +++ b/spec/codelog/command/step/version_spec.rb @@ -39,6 +39,7 @@ allow_any_instance_of(described_class).to receive(:config_file_exists?) { true } end + # Todo: Fix Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated context "within normal run" do before :each do allow(File).to receive(:file?).and_return(false) @@ -49,7 +50,7 @@ it 'merges the content of the files with the same category' do expect(subject).to receive(:generate_changelog_content_from) - .with('Category_1' => ['value_1', 'value_2', { 'Subcategory_1' => 'value_3' }]) + .with({ 'Category_1' => ['value_1', 'value_2', { 'Subcategory_1' => 'value_3' }] }) subject.run end