spec/lib/integration_spec.rb in wisper-2.0.1 vs spec/lib/integration_spec.rb in wisper-3.0.0.rc1
- old
+ new
@@ -13,11 +13,11 @@
describe Wisper do
it 'subscribes object to all published events' do
listener = double('listener')
- expect(listener).to receive(:success).with('hello')
+ expect(listener).to receive(:success).with('hello', **{})
command = MyCommand.new
command.subscribe(listener)
@@ -25,11 +25,11 @@
end
it 'maps events to different methods' do
listener_1 = double('listener')
listener_2 = double('listener')
- expect(listener_1).to receive(:happy_days).with('hello')
- expect(listener_2).to receive(:sad_days).with('world')
+ expect(listener_1).to receive(:happy_days).with('hello', **{})
+ expect(listener_2).to receive(:sad_days).with('world', **{})
command = MyCommand.new
command.subscribe(listener_1, :on => :success, :with => :happy_days)
command.subscribe(listener_2, :on => :failure, :with => :sad_days)