Skip to content

Commit

Permalink
Set explicit hash as last arg to avoid "wrong number of arguments" error
Browse files Browse the repository at this point in the history
Error was happening on Ruby3.0.0-preview1
  • Loading branch information
benoittgt committed Nov 22, 2020
1 parent 6394472 commit 67a9899
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions features/matchers/have_broadcasted_matcher.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: have_broadcasted matcher
it "matches with stream name" do
expect {
ActionCable.server.broadcast(
"notifications", text: 'Hello!'
"notifications", { text: "Hello!" }
)
}.to have_broadcasted_to("notifications")
end
Expand All @@ -34,7 +34,7 @@ Feature: have_broadcasted matcher
it "matches with message" do
expect {
ActionCable.server.broadcast(
"notifications", text: 'Hello!'
"notifications", { text: "Hello!" }
)
}.to have_broadcasted_to("notifications").with(text: 'Hello!')
end
Expand All @@ -52,7 +52,7 @@ Feature: have_broadcasted matcher
it "matches with message" do
expect {
ActionCable.server.broadcast(
"notifications", text: 'Hello!', user_id: 12
"notifications", { text: 'Hello!', user_id: 12 }
)
}.to have_broadcasted_to("notifications").with(a_hash_including(text: 'Hello!'))
end
Expand All @@ -70,7 +70,7 @@ Feature: have_broadcasted matcher
it "matches with message" do
expect {
ActionCable.server.broadcast(
"notifications", text: 'Hello!', user_id: 12
"notifications", { text: 'Hello!', user_id: 12 }
)
}.to have_broadcasted_to("notifications").with { |data|
expect(data['user_id']).to eq 12
Expand All @@ -90,7 +90,7 @@ Feature: have_broadcasted matcher
it "matches with stream name" do
expect {
ActionCable.server.broadcast(
"notifications", text: 'Hello!'
"notifications", { text: 'Hello!' }
)
}.to broadcast_to("notifications")
end
Expand Down

0 comments on commit 67a9899

Please # to comment.