Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kwargs matching with rspec-mock 3.12 and Ruby 3+. #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions spec/lib/notiffany/notifier_spec.rb
Expand Up @@ -143,7 +143,7 @@ module Notiffany

context "when available" do
it "adds the notifier to the notifications" do
expect(detected).to receive(:add).with(:foo, bar: :baz)
expect(detected).to receive(:add).with(:foo, { bar: :baz })
subject
end
end
Expand Down Expand Up @@ -181,7 +181,7 @@ module Notiffany
context "when available" do
it "adds the notifier to the notifications" do
expect(detected).to receive(:add).
with(:foo, bar: :baz)
with(:foo, { bar: :baz })
subject
end
end
Expand Down Expand Up @@ -333,8 +333,8 @@ module Notiffany
end

it "sends notifications" do
expect(foo_object).to receive(:notify).with("Hello", foo: "bar")
expect(bar_object).to receive(:notify).with("Hello", foo: "bar")
expect(foo_object).to receive(:notify).with("Hello", { foo: "bar" })
expect(bar_object).to receive(:notify).with("Hello", { foo: "bar" })
subject.notify("Hello", foo: "bar")
end

Expand All @@ -358,16 +358,16 @@ module Notiffany
let(:enabled) { true }

it "sends notifications" do
expect(foo_object).to receive(:notify).with("Hello", foo: "bar")
expect(bar_object).to receive(:notify).with("Hello", foo: "bar")
expect(foo_object).to receive(:notify).with("Hello", { foo: "bar" })
expect(bar_object).to receive(:notify).with("Hello", { foo: "bar" })
subject.notify("Hello", foo: "bar")
end

context "when a child process" do
before { allow(env).to receive(:notify_pid).and_return($$ + 100) }
it "sends notifications" do
expect(foo_object).to receive(:notify).with("Hello", foo: "bar")
expect(bar_object).to receive(:notify).with("Hello", foo: "bar")
expect(foo_object).to receive(:notify).with("Hello", { foo: "bar" })
expect(bar_object).to receive(:notify).with("Hello", { foo: "bar" })
subject.notify("Hello", foo: "bar")
end
end
Expand Down