spec/aggregate_root_spec.rb in eventus-0.4.3 vs spec/aggregate_root_spec.rb in eventus-0.5.0
- old
+ new
@@ -16,11 +16,11 @@
end
end
describe Eventus::AggregateRoot do
let(:events) { [] }
- let(:persistence) { stub.as_null_object }
+ let(:persistence) { double.as_null_object }
before do
TestAgg.stub(:persistence).and_return(persistence)
end
@@ -41,11 +41,11 @@
end
end
describe "when applying a new change" do
let(:aggregate) { TestAgg.new }
- let(:stream) { stub(:stream, :committed_events => []) }
+ let(:stream) { double(:stream, :committed_events => []) }
before do
aggregate.populate(stream)
end
@@ -55,10 +55,10 @@
end
end
describe "when saving" do
let(:aggregate) { TestAgg.new }
- let(:stream) { stub(:stream, :committed_events => events, :version => 0) }
+ let(:stream) { double(:stream, :committed_events => events, :version => 0) }
let(:events) { [{'name' => :lemon_squeezed}] }
before do
aggregate.populate(stream)
end