Skip to content

Commit

Permalink
Address CI failure in Ruby 3
Browse files Browse the repository at this point in the history
Since rspec-mocks v3.10.3, `with` now distinguishes between keyword args and hash in Ruby 3.
See rspec/rspec-mocks#1394 for details.
  • Loading branch information
mishina2228 committed Mar 22, 2022
1 parent 0264e1f commit da6b6d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spec/uniform_notifier/airbrake_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Airbrake
end

it 'should notify airbrake' do
expect(Airbrake).to receive(:notify).with(UniformNotifier::Exception.new('notify airbrake'), foo: :bar)
expect(Airbrake).to receive(:notify).with(UniformNotifier::Exception.new('notify airbrake'), { foo: :bar })

UniformNotifier.airbrake = { foo: :bar }
UniformNotifier::AirbrakeNotifier.out_of_channel_notify('notify airbrake')
Expand Down
4 changes: 2 additions & 2 deletions spec/uniform_notifier/bugsnag_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Bugsnag
expect(Bugsnag).to receive(:notify).with(
UniformNotifier::Exception.new(notification_data)
).and_yield(report)
expect(report).to receive(:meta_data=).with(foo: :bar)
expect(report).to receive(:meta_data=).with({ foo: :bar })

UniformNotifier.bugsnag = ->(report) { report.meta_data = { foo: :bar } }
UniformNotifier::BugsnagNotifier.out_of_channel_notify(notification_data)
Expand All @@ -62,7 +62,7 @@ class Bugsnag
expect(Bugsnag).to receive(:notify).with(
UniformNotifier::Exception.new(notification_data[:title])
).and_yield(report)
expect(report).to receive(:meta_data=).with(foo: :bar)
expect(report).to receive(:meta_data=).with({ foo: :bar })

UniformNotifier.bugsnag = ->(report) { report.meta_data = { foo: :bar } }
UniformNotifier::BugsnagNotifier.out_of_channel_notify(notification_data)
Expand Down
2 changes: 1 addition & 1 deletion spec/uniform_notifier/honeybadger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Honeybadger
end

it 'should notify honeybadger' do
expect(Honeybadger).to receive(:notify).with(UniformNotifier::Exception.new('notify honeybadger'), foo: :bar)
expect(Honeybadger).to receive(:notify).with(UniformNotifier::Exception.new('notify honeybadger'), { foo: :bar })

UniformNotifier.honeybadger = { foo: :bar }
UniformNotifier::HoneybadgerNotifier.out_of_channel_notify('notify honeybadger')
Expand Down

0 comments on commit da6b6d6

Please sign in to comment.