summaryrefslogtreecommitdiff
path: root/spec/unit/provider/deploy_spec.rb
diff options
context:
space:
mode:
authorsdelano <stephen@opscode.com>2012-12-03 20:31:13 -0800
committersdelano <stephen@opscode.com>2012-12-13 11:27:51 -0800
commit9c82caedba850f68233332e6a78c602c01ea66f6 (patch)
treefdc89a48c77705a2adbb1566adad788662d54a9e /spec/unit/provider/deploy_spec.rb
parentc3b97779bec7487dc6df5c4d4abdec44e5b8e9c7 (diff)
downloadchef-9c82caedba850f68233332e6a78c602c01ea66f6.tar.gz
CHEF-3660: use FileUtils.cp_r to copy directories in deploy_provider
Diffstat (limited to 'spec/unit/provider/deploy_spec.rb')
-rw-r--r--spec/unit/provider/deploy_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/provider/deploy_spec.rb b/spec/unit/provider/deploy_spec.rb
index ebbc6e2823..ef4aed800d 100644
--- a/spec/unit/provider/deploy_spec.rb
+++ b/spec/unit/provider/deploy_spec.rb
@@ -320,13 +320,13 @@ describe Chef::Provider::Deploy do
it "makes a copy of the cached repo in releases dir" do
FileUtils.should_receive(:mkdir_p).with("/my/deploy/dir/releases")
- @provider.should_receive(:run_command).with({:command => "cp -RPp /my/deploy/dir/shared/cached-copy/. #{@expected_release_dir}"})
+ FileUtils.should_receive(:cp_r).with("/my/deploy/dir/shared/cached-copy/.", @expected_release_dir, :preserve => true)
@provider.copy_cached_repo
end
it "calls the internal callback :release_created when copying the cached repo" do
FileUtils.stub!(:mkdir_p)
- @provider.stub!(:run_command).and_return(true)
+ FileUtils.stub!(:cp_r)
@provider.should_receive(:release_created)
@provider.copy_cached_repo
end