diff options
author | Jack Foy <jfoy@whitepages.com> | 2013-07-19 15:26:27 -0700 |
---|---|---|
committer | Jack Foy <jfoy@whitepages.com> | 2013-07-19 15:26:27 -0700 |
commit | bea9db89eb6ef95daaa647cb21b78f9c1a1644fe (patch) | |
tree | 8cff6d2147a1540a21afdce4cf6e311e3dfe44ef /spec/unit/provider | |
parent | cfbc8c443ad8d46a13006be9ebf21886048f8860 (diff) | |
download | chef-bea9db89eb6ef95daaa647cb21b78f9c1a1644fe.tar.gz |
Extend deploy provider spec to cover timeout
Diffstat (limited to 'spec/unit/provider')
-rw-r--r-- | spec/unit/provider/deploy_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/unit/provider/deploy_spec.rb b/spec/unit/provider/deploy_spec.rb index 56ba50b7f0..0d837f99c3 100644 --- a/spec/unit/provider/deploy_spec.rb +++ b/spec/unit/provider/deploy_spec.rb @@ -43,6 +43,20 @@ describe Chef::Provider::Deploy do @provider.should respond_to(:action_rollback) end + context "when the deploy resource has a timeout attribute" do + let(:ten_seconds) { 10 } + before { @resource.timeout(ten_seconds) } + it "relays the timeout to the scm resource" do + @provider.scm_provider.new_resource.timeout.should == ten_seconds + end + end + + context "when the deploy resource has no timeout attribute" do + it "should not set a timeout on the scm resource" do + @provider.scm_provider.new_resource.timeout.should be_nil + end + end + context "when the deploy_to dir does not exist yet" do before do FileUtils.should_receive(:mkdir_p).with(@resource.deploy_to).ordered |