spec/models/concerns/subscribable_spec.rb in reactor-0.9.6 vs spec/models/concerns/subscribable_spec.rb in reactor-0.9.7

- old
+ new

@@ -33,11 +33,11 @@ before { Reactor::TEST_MODE_SUBSCRIBERS.clear } describe 'on_event' do it 'binds block of code statically to event being fired' do expect_any_instance_of(Auction).to receive(:update_column).with(:status, 'first_bid_made') - Reactor::Event.publish(:bid_made, target: Auction.create) + Reactor::Event.publish(:bid_made, target: Auction.create!(start_at: 10.minutes.from_now)) end describe 'building uniquely named subscriber handler classes' do it 'adds a static subscriber to the global lookup constant' do expect(Reactor::SUBSCRIBERS['puppy_delivered'][0]).to eq(Reactor::StaticSubscribers::PuppyDeliveredHandler0) @@ -63,10 +63,10 @@ Reactor::Event.publish(:any_event) end it 'accepts wildcard event name' do expect_any_instance_of(Auction).to receive(:more_puppies!) - Reactor::Event.publish(:another_event, actor: Auction.create) + Reactor::Event.publish(:another_event, actor: Auction.create!(start_at: 5.minutes.from_now)) end describe 'in_memory flag' do it 'doesnt fire perform_async when true' do expect(Auction).to receive(:puppies!)