spec/stream_spec.rb in eventus-0.3.9 vs spec/stream_spec.rb in eventus-0.4.0

- old
+ new

@@ -16,9 +16,15 @@ it "should have no uncommitted events" do stream.uncommitted_events.should be_empty end + it "should not commit to persistence if no uncommited events" do + persistence.should_not_receive(:commit) + stream.uncommitted_events.clear + stream.commit + end + describe "when events available from persistence" do before do persistence.should_receive(:load).and_return([stub, stub]) end