spec/shelly/cli/deploy_spec.rb in shelly-0.3.4 vs spec/shelly/cli/deploy_spec.rb in shelly-0.3.5.pre

- old
+ new

@@ -84,9 +84,18 @@ expected_output invoke(@deploys, :show, "last") end end + context "log is missing" do + it "should show error about contact support" do + @client.should_receive(:deploy_log).with("foo-staging", "last").and_return({}) + $stdout.should_receive(:puts).with(red "There was an error and log is not available") + $stdout.should_receive(:puts).with(red "Please contact our support https://shellycloud.com/support") + lambda { invoke(@deploys, :show, "last") }.should raise_error(SystemExit) + end + end + def expected_output $stdout.should_receive(:puts).with(green "Log for deploy done on 2011-12-12 at 14:14:59") $stdout.should_receive(:puts).with(green "Starting bundle install") $stdout.should_receive(:puts).with("Installing gems") $stdout.should_receive(:puts).with(green "Starting whenever")