lib/reactor/testing/matchers.rb in reactor-0.9.7 vs lib/reactor/testing/matchers.rb in reactor-0.9.8

- old
+ new

@@ -26,13 +26,13 @@ expect(Reactor::Event).to have_received(:publish).with(name, a_hash_including(defaults)).at_least(:once) end end end -RSpec::Matchers.define :subscribe_to do |name, data = {}, &expectations| +RSpec::Matchers.define :subscribe_to do |name, data = {}| supports_block_expectations match do - expectations.call if expectations.present? + block_arg.call if block_arg.present? Reactor::Event.publish(name, data) end end