diff --git a/pusher-fake.gemspec b/pusher-fake.gemspec index 5b00ea8..d73da18 100644 --- a/pusher-fake.gemspec +++ b/pusher-fake.gemspec @@ -27,17 +27,17 @@ Gem::Specification.new do |s| s.add_dependency "multi_json", "~> 1.6" s.add_dependency "thin", "~> 1" - s.add_development_dependency "capybara", "3.39.1" - s.add_development_dependency "puma", "6.3.0" + s.add_development_dependency "capybara", "3.39.2" + s.add_development_dependency "puma", "6.3.1" s.add_development_dependency "pusher", "2.0.3" s.add_development_dependency "rake", "13.0.6" s.add_development_dependency "rspec", "3.12.0" - s.add_development_dependency "rubocop", "1.51.0" + s.add_development_dependency "rubocop", "1.56.1" s.add_development_dependency "rubocop-capybara", "2.18.0" - s.add_development_dependency "rubocop-performance", "1.18.0" + s.add_development_dependency "rubocop-performance", "1.19.0" s.add_development_dependency "rubocop-rake", "0.6.0" - s.add_development_dependency "rubocop-rspec", "2.22.0" - s.add_development_dependency "selenium-webdriver", "4.9.1" - s.add_development_dependency "sinatra", "3.0.6" + s.add_development_dependency "rubocop-rspec", "2.23.2" + s.add_development_dependency "selenium-webdriver", "4.11.0" + s.add_development_dependency "sinatra", "3.1.0" s.add_development_dependency "yard", "0.9.34" end diff --git a/spec/lib/pusher-fake/channel/presence_spec.rb b/spec/lib/pusher-fake/channel/presence_spec.rb index a9cdb5b..70f0aed 100644 --- a/spec/lib/pusher-fake/channel/presence_spec.rb +++ b/spec/lib/pusher-fake/channel/presence_spec.rb @@ -37,9 +37,11 @@ before do allow(PusherFake::Webhook).to receive(:trigger) allow(MultiJson).to receive(:load).and_return(channel_data) - allow(subject).to receive(:connections).and_return(connections) - allow(subject).to receive(:emit).and_return(nil) - allow(subject).to receive(:subscription_data).and_return(subscription_data) + allow(subject).to receive_messages( + connections: connections, + emit: nil, + subscription_data: subscription_data + ) end it "authorizes the connection" do @@ -150,8 +152,7 @@ before do allow(PusherFake::Webhook).to receive(:trigger) - allow(subject).to receive(:connections).and_return([connection]) - allow(subject).to receive(:emit).and_return(nil) + allow(subject).to receive_messages(connections: [connection], emit: nil) subject.members[connection] = channel_data end @@ -193,9 +194,7 @@ let(:channel_data) { { user_id: user_id } } before do - allow(subject).to receive(:connections).and_return([]) - allow(subject).to receive(:emit).and_return(nil) - allow(subject).to receive(:trigger).and_return(nil) + allow(subject).to receive_messages(connections: [], emit: nil, trigger: nil) end it "does not raise an error" do diff --git a/spec/lib/pusher-fake/connection_spec.rb b/spec/lib/pusher-fake/connection_spec.rb index d1e1192..30962ba 100644 --- a/spec/lib/pusher-fake/connection_spec.rb +++ b/spec/lib/pusher-fake/connection_spec.rb @@ -229,8 +229,7 @@ end it "does not emit the event when the channel is not private" do - allow(channel).to receive(:is_a?).and_return(false) - allow(channel).to receive(:includes?).and_return(true) + allow(channel).to receive_messages(is_a?: false, includes?: true) subject.process(json) @@ -294,8 +293,7 @@ end it "includes user ID in event when on a presence channel" do - allow(channel).to receive(:is_a?).and_return(true) - allow(channel).to receive(:members).and_return(members) + allow(channel).to receive_messages(is_a?: true, members: members) subject.process(json) diff --git a/spec/lib/pusher-fake/server_spec.rb b/spec/lib/pusher-fake/server_spec.rb index bd33eeb..a472398 100644 --- a/spec/lib/pusher-fake/server_spec.rb +++ b/spec/lib/pusher-fake/server_spec.rb @@ -6,8 +6,7 @@ subject { described_class } before do - allow(subject).to receive(:start_web_server).and_return(nil) - allow(subject).to receive(:start_socket_server).and_return(nil) + allow(subject).to receive_messages(start_web_server: nil, start_socket_server: nil) allow(EventMachine).to receive(:run).and_return(nil) end