spec/models/subscriber_spec.rb in reactor-0.10.0 vs spec/models/subscriber_spec.rb in reactor-0.10.1
- old
+ new
@@ -21,11 +21,13 @@
end
end
describe 'matcher' do
+ before { MySubscriber.create!(event_name: '*') }
+ after { MySubscriber.destroy_all }
+
it 'can be set to star to bind to all events' do
- MySubscriber.create!(event_name: '*')
expect_any_instance_of(MySubscriber).to receive(:fire).with(hash_including('random' => 'data', 'event' => 'this_event'))
Reactor::Event.publish(:this_event, {random: 'data'})
end
end
end