spec/stream_spec.rb in eventus-0.3.6 vs spec/stream_spec.rb in eventus-0.3.7

- old
+ new

@@ -42,11 +42,12 @@ stream.uncommitted_events.length.should == 2 end describe "when committed" do before do - persistence.should_receive(:commit) - dispatcher.should_receive(:dispatch) + payload = {:truck => 'money'} + persistence.should_receive(:commit).and_return(payload) + dispatcher.should_receive(:dispatch).with(payload) stream.commit end it "should have timestamp on committed events" do stream.committed_events.all?{ |e| e['time'] }.should == true