spec/container_spec.rb in testlab-0.5.0 vs spec/container_spec.rb in testlab-0.5.1
- old
+ new
@@ -186,22 +186,22 @@
describe "#setup" do
context "with no provisioner" do
it "should create and online the container" do
subject.stub(:create) { true }
subject.stub(:up) { true }
- subject.instance_variable_get(:@provisioner) and subject.instance_variable_get(:@provisioner).stub(:setup) { true }
+ subject.provisioners = Array.new
subject.setup
end
end
context "with the shell provisioner" do
it "should create and online the container" do
subject = TestLab::Container.first('server-shell')
subject.stub(:create) { true }
subject.stub(:up) { true }
- subject.instance_variable_get(:@provisioner) and subject.instance_variable_get(:@provisioner).stub(:setup) { true }
+ subject.provisioners = Array.new
subject.setup
end
end
end
@@ -209,21 +209,21 @@
describe "#teardown" do
context "with no provisioner" do
it "should create and online the container" do
subject.stub(:down) { true }
subject.stub(:destroy) { true }
- subject.instance_variable_get(:@provisioner) and subject.instance_variable_get(:@provisioner).stub(:teardown) { true }
+ subject.provisioners = Array.new
subject.teardown
end
end
context "with the shell provisioner" do
it "should create and online the container" do
subject = TestLab::Container.first('server-shell')
subject.stub(:down) { true }
subject.stub(:destroy) { true }
- subject.instance_variable_get(:@provisioner) and subject.instance_variable_get(:@provisioner).stub(:teardown) { true }
+ subject.provisioners = Array.new
subject.teardown
end
end