spec/shelly/app_spec.rb in shelly-0.2.12 vs spec/shelly/app_spec.rb in shelly-0.2.13

- old
+ new

@@ -194,17 +194,19 @@ end end describe "#start & #stop" do it "should start cloud" do - @client.should_receive(:start_cloud).with("foo-staging") - @app.start + @client.should_receive(:start_cloud).with("foo-staging"). + and_return("deployment" => {"id" => "DEPLOYMENT_ID"}) + @app.start.should == "DEPLOYMENT_ID" end it "should stop cloud" do - @client.should_receive(:stop_cloud).with("foo-staging") - @app.stop + @client.should_receive(:stop_cloud).with("foo-staging"). + and_return("deployment" => {"id" => "DEPLOYMENT_ID"}) + @app.stop.should == "DEPLOYMENT_ID" end end describe "#deploy_logs" do it "should list deploy_logs" do @@ -286,11 +288,12 @@ end end describe "#redeploy" do it "should redeploy app via API" do - @client.should_receive(:redeploy).with("foo-staging") - @app.redeploy + @client.should_receive(:redeploy).with("foo-staging"). + and_return("deployment" => {"id" => "DEPLOYMENT_ID"}) + @app.redeploy.should == "DEPLOYMENT_ID" end end describe "#rake" do it "should return result of rake task" do