spec/opsicle/commands/deploy_spec.rb in opsicle-0.2.0 vs spec/opsicle/commands/deploy_spec.rb in opsicle-0.2.1
- old
+ new
@@ -17,26 +17,28 @@
allow(monitor).to receive(:start)
end
it "creates a new deployment" do
expect(client).to receive(:run_command).with('deploy').and_return({deployment_id: 'derp'})
+ expect(subject).to_not receive(:open_deploy)
+ expect(Monitor::App).to_not receive(:new)
subject.execute
end
- it "runs the Opsicle Stack Monitor by default" do
+ it "runs the Opsicle Stack Monitor if monitor option is given" do
expect(Monitor::App).to receive(:new).and_return(monitor)
expect(monitor).to receive(:start)
expect(subject).to_not receive(:open_deploy)
- subject.execute
+ subject.execute({ monitor: true })
end
it "opens the OpsWorks deployments screen if browser option is given" do
expect(subject).to receive(:open_deploy)
expect(Monitor::App).to_not receive(:new)
- subject.execute({browser: true})
+ subject.execute({ browser: true })
end
end
context "#client" do
it "generates a new aws client from the given configs" do