spec/network_spec.rb in testlab-0.9.1 vs spec/network_spec.rb in testlab-1.0.0

- old
+ new

@@ -109,60 +109,62 @@ describe "#create" do it "should create the network bridge" do subject.node.stub(:state) { :running } subject.stub(:state) { :not_created } - subject.node.ssh.stub(:exec) { true } + subject.node.ssh.stub(:bootstrap) { true } subject.create end end describe "#destroy" do it "should destroy the network bridge" do subject.node.stub(:state) { :running } subject.stub(:state) { :stopped } - subject.node.ssh.stub(:exec) { true } + subject.node.ssh.stub(:bootstrap) { true } subject.destroy end end describe "#up" do it "should online the network bridge" do subject.node.stub(:state) { :running } subject.stub(:state) { :stopped } - subject.node.ssh.stub(:exec) { true } + subject.node.ssh.stub(:bootstrap) { true } subject.up end end describe "#down" do it "should offline the network bridge" do subject.node.stub(:state) { :running } subject.stub(:state) { :running } - subject.node.ssh.stub(:exec) { true } + subject.node.ssh.stub(:bootstrap) { true } subject.down end end - describe "#setup" do + describe "#provision" do it "should create and online the network" do subject.node.stub(:state) { :running } subject.stub(:state) { :running } subject.stub(:create) { true } subject.stub(:up) { true } + subject.stub(:provisioners) { Array.new } - subject.setup + subject.provision end end - describe "#teardown" do + describe "#deprovision" do it "should create and online the network" do subject.node.stub(:state) { :running } subject.stub(:state) { :running } subject.stub(:down) { true } subject.stub(:destroy) { true } + subject.stub(:provisioners) { Array.new } - subject.teardown + subject.deprovision end end end