Skip to content

Commit

Permalink
test: Wrap argument expection in curly brackets
Browse files Browse the repository at this point in the history
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](rspec/rspec-mocks#1460)
  • Loading branch information
msuzoagu committed Jul 12, 2023
1 parent a2aec15 commit d5c1da7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/codelog/command/step/version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit d5c1da7

Please sign in to comment.