diff options
author | tylercloke <tyler@opscode.com> | 2012-11-05 13:25:00 -0800 |
---|---|---|
committer | tylercloke <tyler@opscode.com> | 2012-11-05 16:07:55 -0800 |
commit | d0238d6ff8a32b10a76ae8ec059c8794d30ed6f3 (patch) | |
tree | d74d5d390e1ba9732e3ce04b042c58b694ebed34 /spec/unit/provider/deploy | |
parent | 926726fb40f738fa7d0c1c7944c8c3350a1694e8 (diff) | |
download | chef-d0238d6ff8a32b10a76ae8ec059c8794d30ed6f3.tar.gz |
Finished refactoring converge and updated tests
so that converge and converge! are no longer a method in the provider and why_run, respectively. There is instead set_updated_status in provider. Everything is now converged in why_run's add_action, so neither of the converge methods should ever need to be called. Updated tests to reflect this. Removed all calls to converge, and replaced with set_updated_status only for tests that are looking at the update status of a provider, where the converge behavior has been mocked out.
Diffstat (limited to 'spec/unit/provider/deploy')
-rw-r--r-- | spec/unit/provider/deploy/revision_spec.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/spec/unit/provider/deploy/revision_spec.rb b/spec/unit/provider/deploy/revision_spec.rb index 396dd09a8e..3287c085d5 100644 --- a/spec/unit/provider/deploy/revision_spec.rb +++ b/spec/unit/provider/deploy/revision_spec.rb @@ -55,11 +55,9 @@ describe Chef::Provider::Deploy::Revision do FileUtils.stub!(:mkdir_p) @provider.stub!(:run_command).and_return(true) @provider.copy_cached_repo - @provider.converge @provider.stub!(:release_slug).and_return("73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2") @provider.load_current_resource @provider.copy_cached_repo - @provider.converge second_release = "/my/deploy/dir/releases/73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2" @provider.all_releases.should == [@expected_release_dir,second_release] @@ -69,20 +67,16 @@ describe Chef::Provider::Deploy::Revision do FileUtils.stub!(:mkdir_p) @provider.stub!(:run_command).and_return(true) @provider.copy_cached_repo - @provider.converge @provider.stub!(:release_slug).and_return("73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2") @provider.load_current_resource @provider.copy_cached_repo - @provider.converge second_release = "/my/deploy/dir/releases/73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2" @provider.all_releases.should == [@expected_release_dir,second_release] @provider.copy_cached_repo - @provider.converge @provider.stub!(:release_slug).and_return("8a3195bf3efa246f743c5dfa83683201880f935c") @provider.load_current_resource @provider.copy_cached_repo - @provider.converge @provider.all_releases.should == [second_release, @expected_release_dir] end |