lib/reactor/testing/matchers.rb in reactor-0.2.7 vs lib/reactor/testing/matchers.rb in reactor-0.2.8
- old
+ new
@@ -1,17 +1,17 @@
RSpec::Matchers.define :publish_event do |name, data = {}|
match do |block|
- defaults = {:actor => anything, :target => anything}
+ defaults = {:actor => anything, :target => anything, at: nil}
Reactor::Event.should_receive(:publish).with(name, defaults.merge(data))
block.call
end
end
RSpec::Matchers.define :publish_events do |*args|
match do |block|
- defaults = {:actor => anything, :target => anything}
+ defaults = {:actor => anything, :target => anything, at: nil}
args.each do |event|
case event
when Symbol
Reactor::Event.should_receive(:publish).with(event, anything)
\ No newline at end of file