Skip to content

Commit 1e3a492

Browse files
committed
Add message expectations for file permission enforcement
1 parent 016a96c commit 1e3a492

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spec/unit/provider/deploy_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969

7070
it "creates deploy_to dir" do
7171
::Dir.should_receive(:chdir).with(@expected_release_dir).exactly(4).times
72+
@provider.should_receive(:enforce_ownership).twice
7273
@provider.stub(:update_cached_repo)
7374
@provider.deploy
7475
end
@@ -80,6 +81,7 @@
8081
::Dir.should_receive(:chdir).with(@expected_release_dir).exactly(4).times
8182
FileUtils.should_not_receive(:mkdir_p).with(@resource.deploy_to)
8283
FileUtils.should_not_receive(:mkdir_p).with(@resource.shared_path)
84+
@provider.should_receive(:enforce_ownership).twice
8385
@provider.stub(:copy_cached_repo)
8486
@provider.stub(:update_cached_repo)
8587
@provider.stub(:symlink)
@@ -94,6 +96,7 @@
9496
@provider.stub(:copy_cached_repo)
9597
@provider.stub(:update_cached_repo)
9698
@provider.stub(:install_gems)
99+
@provider.should_receive(:enforce_ownership).ordered
97100
@provider.stub(:enforce_ownership)
98101
@provider.stub(:symlink)
99102
@provider.stub(:migrate)

0 commit comments

Comments
 (0)