summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Valyi <rvalyi@gmail.com>2014-05-19 17:58:48 -0300
committerRaphaël Valyi <rvalyi@gmail.com>2014-05-19 17:58:48 -0300
commit3af439e1086d756434172eb813b279dd257d0f64 (patch)
treea4e187006961f81a5a43c4267681524c15f392aa
parenta9f7f503651e119b55bcecd57ae005282fbd3c0a (diff)
downloadchef-3af439e1086d756434172eb813b279dd257d0f64.tar.gz
updating git provider specs according to previous fix saving 1 system call during git sync
-rw-r--r--spec/unit/provider/git_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/provider/git_spec.rb b/spec/unit/provider/git_spec.rb
index 3986c39ed2..2179db15ff 100644
--- a/spec/unit/provider/git_spec.rb
+++ b/spec/unit/provider/git_spec.rb
@@ -459,7 +459,7 @@ SHAS
it "syncs the code by updating the source when the repo has already been checked out" do
::File.should_receive(:exist?).with("/my/deploy/dir/.git").and_return(true)
::File.stub(:directory?).with("/my/deploy").and_return(true)
- @provider.should_receive(:find_current_revision).exactly(2).and_return('d35af14d41ae22b19da05d7d03a0bafc321b244c')
+ @provider.should_receive(:find_current_revision).exactly(1).and_return('d35af14d41ae22b19da05d7d03a0bafc321b244c')
@provider.should_not_receive(:fetch_updates)
@provider.should_receive(:add_remotes)
@provider.run_action(:sync)
@@ -470,7 +470,7 @@ SHAS
::File.should_receive(:exist?).with("/my/deploy/dir/.git").and_return(true)
::File.stub(:directory?).with("/my/deploy").and_return(true)
# invoked twice - first time from load_current_resource
- @provider.should_receive(:find_current_revision).exactly(2).and_return('d35af14d41ae22b19da05d7d03a0bafc321b244c')
+ @provider.should_receive(:find_current_revision).exactly(1).and_return('d35af14d41ae22b19da05d7d03a0bafc321b244c')
@provider.stub(:target_revision).and_return('28af684d8460ba4793eda3e7ac238c864a5d029a')
@provider.should_receive(:fetch_updates)
@provider.should_receive(:enable_submodules)