spec/unit/container_spec.rb in spank-0.0.1369197619 vs spec/unit/container_spec.rb in spank-0.0.1385937112
- old
+ new
@@ -25,12 +25,12 @@
sut.resolve(:container).should == sut
end
end
describe "when multiple items are registered with the same key" do
- let(:jeans) { fake }
- let(:dress_pants) { fake }
+ let(:jeans) { double("jeans") }
+ let(:dress_pants) { double("dress pants") }
before :each do
sut.register(:pants) { jeans }
sut.register(:pants) { dress_pants }
end
@@ -58,11 +58,11 @@
end
end
context "when a component is registered as a singleton" do
before :each do
- sut.register(:singleton) { fake }.as_singleton
+ sut.register(:singleton) { Object.new }.as_singleton
end
it "should return the same instance of that component each time it is resolved" do
sut.resolve(:singleton).should == sut.resolve(:singleton)
end
@@ -86,11 +86,11 @@
def greeting(message)
end
end
context "when the dependencies have been registered" do
- let(:mom) { fake }
- let(:dad) { fake }
+ let(:mom) { double("mom") }
+ let(:dad) { double("dad") }
before :each do
sut.register(:mom) { mom }
sut.register(:dad) { dad }
end