diff options
Diffstat (limited to 'spec/unit/provider/deploy')
-rw-r--r-- | spec/unit/provider/deploy/revision_spec.rb | 20 | ||||
-rw-r--r-- | spec/unit/provider/deploy/timestamped_spec.rb | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/spec/unit/provider/deploy/revision_spec.rb b/spec/unit/provider/deploy/revision_spec.rb index e7be723d28..4f38f77762 100644 --- a/spec/unit/provider/deploy/revision_spec.rb +++ b/spec/unit/provider/deploy/revision_spec.rb @@ -31,7 +31,7 @@ describe Chef::Provider::Deploy::Revision do @provider = Chef::Provider::Deploy::Revision.new(@resource, @run_context) @provider.load_current_resource @runner = mock("runnah") - Chef::Runner.stub!(:new).and_return(@runner) + Chef::Runner.stub(:new).and_return(@runner) @expected_release_dir = "/my/deploy/dir/releases/8a3195bf3efa246f743c5dfa83683201880f935c" end @@ -43,7 +43,7 @@ describe Chef::Provider::Deploy::Revision do it "uses the resolved revision from the SCM as the release slug" do - @provider.scm_provider.stub!(:revision_slug).and_return("uglySlugly") + @provider.scm_provider.stub(:revision_slug).and_return("uglySlugly") @provider.send(:release_slug).should == "uglySlugly" end @@ -52,10 +52,10 @@ describe Chef::Provider::Deploy::Revision do end it "stores the release dir in the file cache in the cleanup step" do - FileUtils.stub!(:mkdir_p) - FileUtils.stub!(:cp_r) + FileUtils.stub(:mkdir_p) + FileUtils.stub(:cp_r) @provider.cleanup! - @provider.stub!(:release_slug).and_return("73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2") + @provider.stub(:release_slug).and_return("73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2") @provider.load_current_resource @provider.cleanup! second_release = "/my/deploy/dir/releases/73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2" @@ -64,17 +64,17 @@ describe Chef::Provider::Deploy::Revision do end it "removes a release from the file cache when it's used again in another release and append it to the end" do - FileUtils.stub!(:mkdir_p) - FileUtils.stub!(:cp_r) + FileUtils.stub(:mkdir_p) + FileUtils.stub(:cp_r) @provider.cleanup! - @provider.stub!(:release_slug).and_return("73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2") + @provider.stub(:release_slug).and_return("73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2") @provider.load_current_resource @provider.cleanup! second_release = "/my/deploy/dir/releases/73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2" @provider.all_releases.should == [@expected_release_dir,second_release] @provider.cleanup! - @provider.stub!(:release_slug).and_return("8a3195bf3efa246f743c5dfa83683201880f935c") + @provider.stub(:release_slug).and_return("8a3195bf3efa246f743c5dfa83683201880f935c") @provider.load_current_resource @provider.cleanup! @provider.all_releases.should == [second_release, @expected_release_dir] @@ -89,7 +89,7 @@ describe Chef::Provider::Deploy::Revision do end @provider.all_releases.should == release_paths - FileUtils.stub!(:rm_rf) + FileUtils.stub(:rm_rf) @provider.cleanup! expected_release_paths = (%w{second third fourth fifth} << @resource.revision).map do |release_name| diff --git a/spec/unit/provider/deploy/timestamped_spec.rb b/spec/unit/provider/deploy/timestamped_spec.rb index a9cea1142e..5e3d07d3d9 100644 --- a/spec/unit/provider/deploy/timestamped_spec.rb +++ b/spec/unit/provider/deploy/timestamped_spec.rb @@ -22,7 +22,7 @@ describe Chef::Provider::Deploy::Timestamped do before do @release_time = Time.utc( 2004, 8, 15, 16, 23, 42) - Time.stub!(:now).and_return(@release_time) + Time.stub(:now).and_return(@release_time) @expected_release_dir = "/my/deploy/dir/releases/20040815162342" @resource = Chef::Resource::Deploy.new("/my/deploy/dir") @node = Chef::Node.new @@ -30,7 +30,7 @@ describe Chef::Provider::Deploy::Timestamped do @run_context = Chef::RunContext.new(@node, {}, @events) @timestamped_deploy = Chef::Provider::Deploy::Timestamped.new(@resource, @run_context) @runner = mock("runnah") - Chef::Runner.stub!(:new).and_return(@runner) + Chef::Runner.stub(:new).and_return(@runner) end it "gives a timestamp for release_slug" do |