spec/network_spec.rb in testlab-0.7.4 vs spec/network_spec.rb in testlab-0.7.5
- old
+ new
@@ -21,11 +21,11 @@
describe TestLab::Network do
subject {
@ui = ZTK::UI.new(:stdout => StringIO.new, :stderr => StringIO.new)
- @testlab = TestLab.new(:labfile => LABFILE, :ui => @ui)
+ @testlab = TestLab.new(:labfile_path => LABFILE, :ui => @ui)
@testlab.networks.first
}
describe "class" do
@@ -106,33 +106,37 @@
end
end
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.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.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.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.down
end
end