spec/container_spec.rb in testlab-0.7.6 vs spec/container_spec.rb in testlab-0.8.0
- old
+ new
@@ -193,10 +193,11 @@
end
describe "#setup" do
context "with no provisioner" do
it "should setup the container" do
+ subject.node.stub(:state) { :running }
subject.lxc.stub(:exists?) { true }
subject.lxc.stub(:state) { :stopped }
subject.provisioners = Array.new
subject.setup
@@ -205,10 +206,11 @@
context "with the shell provisioner" do
it "should setup the container" do
subject = TestLab::Container.first('server-shell')
+ subject.node.stub(:state) { :running }
subject.lxc.stub(:exists?) { true }
subject.lxc.stub(:state) { :stopped }
subject.provisioners = Array.new
subject.setup
@@ -217,10 +219,11 @@
end
describe "#teardown" do
context "with no provisioner" do
it "should teardown the container" do
+ subject.node.stub(:state) { :running }
subject.lxc.stub(:exists?) { true }
subject.lxc.stub(:state) { :stopped }
subject.provisioners = Array.new
subject.teardown
@@ -229,9 +232,10 @@
context "with the shell provisioner" do
it "should teardown the container" do
subject = TestLab::Container.first('server-shell')
+ subject.node.stub(:state) { :running }
subject.lxc.stub(:exists?) { true }
subject.lxc.stub(:state) { :stopped }
subject.provisioners = Array.new
subject.teardown