spec/cli/deploy_spec.rb in simple_deploy-0.6.1 vs spec/cli/deploy_spec.rb in simple_deploy-0.6.2

- old
+ new

@@ -116,11 +116,11 @@ @notifier.should_receive(:send_deployment_complete_message) subject.deploy end - it "should skip the deploy if the attributes update is not successful" do + it "should exit with a status of 1 if the attributes update is not successful" do options = { :environment => 'my_env', :log_level => 'debug', :name => ['my_stack'], :force => true, :internal => false, @@ -142,15 +142,17 @@ :logger => @logger, :name => 'my_stack', :internal => false). and_return(@stack) - @stack.should_receive(:update).with(hash_including(:force => true, :attributes => [{'foo' => 'bah'}])).and_return(false) - @stack.should_not_receive(:deploy) - @notifier.should_not_receive(:send_deployment_start_message) - @notifier.should_not_receive(:send_deployment_complete_message) + @stack.should_receive(:update).with(hash_including(:force => true, + :attributes => [{'foo' => 'bah'}])).and_return(false) - subject.deploy + begin + subject.deploy + rescue SystemExit => e + e.status.should == 1 + end end it "should do the deploy if there are no attributes to update" do options = { :environment => 'my_env', :log_level => 'debug',