[CHEF-3010] - The deploy and deploy_revision resources have inconsistent behavior #262

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+6 −2
Split
@@ -42,6 +42,7 @@ def initialize(new_resource, run_context)
end
def load_current_resource
+ @scm_provider.load_current_resource
@release_path = @new_resource.deploy_to + "/releases/#{release_slug}"
end
@@ -205,7 +206,6 @@ def all_releases
end
def update_cached_repo
- @scm_provider.load_current_resource
if @new_resource.svn_force_export
svn_force_export
else
@@ -32,6 +32,11 @@
@provider.stub!(:release_path).and_return(@expected_release_dir)
end
+ it "loads scm resource" do
+ @provider.scm_provider.should_receive(:load_current_resource)
+ @provider.load_current_resource
+ end
+
it "supports :deploy and :rollback actions" do
@provider.should respond_to(:action_deploy)
@provider.should respond_to(:action_rollback)
@@ -239,7 +244,6 @@
end
it "syncs the cached copy of the repo" do
- @provider.scm_provider.should_receive(:load_current_resource)
@provider.scm_provider.should_receive(:action_sync)
@provider.update_cached_repo
end