spec/container_spec.rb in testlab-1.1.0 vs spec/container_spec.rb in testlab-1.2.0

- old
+ new

@@ -149,21 +149,24 @@ subject.node.stub(:state) { :running } subject.lxc.config.stub(:save) { true } subject.stub(:detect_arch) { "amd64" } subject.lxc.stub(:create) { true } subject.lxc.stub(:state) { :not_created } + subject.lxc_clone.stub(:exists?) { false } subject.node.ssh.stub(:exec) + subject.create end end describe "#destroy" do it "should destroy the container" do subject.node.stub(:state) { :running } subject.lxc.stub(:exists?) { true } subject.lxc.stub(:state) { :stopped } subject.lxc.stub(:destroy) { true } - subject.lxc_clone.stub(:destroy) { true } + subject.lxc_clone.stub(:exists?) { false } + subject.destroy end end describe "#up" do