From 67a9899fda9442949d2d9730b1de7f3205cdaaa1 Mon Sep 17 00:00:00 2001 From: Benoit Tigeot Date: Sun, 22 Nov 2020 15:16:37 +0100 Subject: [PATCH] Set explicit hash as last arg to avoid "wrong number of arguments" error Error was happening on Ruby3.0.0-preview1 --- features/matchers/have_broadcasted_matcher.feature | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/features/matchers/have_broadcasted_matcher.feature b/features/matchers/have_broadcasted_matcher.feature index ecacadafe9..8b639326ac 100644 --- a/features/matchers/have_broadcasted_matcher.feature +++ b/features/matchers/have_broadcasted_matcher.feature @@ -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 @@ -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 @@ -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 @@ -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 @@ -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