spec/network_spec.rb in testlab-1.5.0 vs spec/network_spec.rb in testlab-1.5.1

- old
+ new

@@ -108,55 +108,65 @@ end end describe "#create" do it "should create the network bridge" do + subject.node.stub(:alive?) { true } subject.node.stub(:state) { :running } - subject.stub(:state) { :not_created } subject.node.ssh.stub(:bootstrap) { true } + + subject.stub(:state) { :not_created } subject.stub(:provisioners) { Array.new } subject.create end end describe "#destroy" do it "should destroy the network bridge" do + subject.node.stub(:alive?) { true } subject.node.stub(:state) { :running } - subject.stub(:state) { :stopped } subject.node.ssh.stub(:bootstrap) { true } + + subject.stub(:state) { :stopped } subject.stub(:provisioners) { Array.new } subject.destroy end end describe "#up" do it "should online the network bridge" do + subject.node.stub(:alive?) { true } subject.node.stub(:state) { :running } - subject.stub(:state) { :stopped } subject.node.ssh.stub(:bootstrap) { true } + + subject.stub(:state) { :stopped } subject.stub(:provisioners) { Array.new } subject.up end end describe "#down" do it "should offline the network bridge" do + subject.node.stub(:alive?) { true } subject.node.stub(:state) { :running } - subject.stub(:state) { :running } subject.node.ssh.stub(:bootstrap) { true } + + subject.stub(:state) { :running } subject.stub(:provisioners) { Array.new } subject.down end end describe "#provision" do it "should create and online the network" do + subject.node.stub(:alive?) { true } subject.node.stub(:state) { :running } + subject.stub(:state) { :running } subject.stub(:create) { true } subject.stub(:up) { true } subject.stub(:provisioners) { Array.new } @@ -164,10 +174,12 @@ end end describe "#deprovision" do it "should create and online the network" do + subject.node.stub(:alive?) { true } subject.node.stub(:state) { :running } + subject.stub(:state) { :running } subject.stub(:down) { true } subject.stub(:destroy) { true } subject.stub(:provisioners) { Array.new }