diff options
Diffstat (limited to 'spec/unit/provider/execute_spec.rb')
-rw-r--r-- | spec/unit/provider/execute_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/provider/execute_spec.rb b/spec/unit/provider/execute_spec.rb index 0d108f521d..78216a89fa 100644 --- a/spec/unit/provider/execute_spec.rb +++ b/spec/unit/provider/execute_spec.rb @@ -33,12 +33,12 @@ describe Chef::Provider::Execute do @provider.current_resource = @current_resource Chef::Log.level = :info # FIXME: There should be a test for how STDOUT.tty? changes the live_stream option being passed - STDOUT.stub!(:tty?).and_return(true) + STDOUT.stub(:tty?).and_return(true) end it "should execute foo_resource" do - @provider.stub!(:load_current_resource) + @provider.stub(:load_current_resource) opts = {} opts[:timeout] = @new_resource.timeout opts[:returns] = @new_resource.returns @@ -53,7 +53,7 @@ describe Chef::Provider::Execute do end it "should do nothing if the sentinel file exists" do - @provider.stub!(:load_current_resource) + @provider.stub(:load_current_resource) File.should_receive(:exists?).with(@new_resource.creates).and_return(true) @provider.should_not_receive(:shell_out!) Chef::Log.should_not_receive(:warn) @@ -65,7 +65,7 @@ describe Chef::Provider::Execute do it "should respect cwd options for 'creates'" do @new_resource.cwd "/tmp" @new_resource.creates "foo_resource" - @provider.stub!(:load_current_resource) + @provider.stub(:load_current_resource) File.should_receive(:exists?).with(@new_resource.creates).and_return(false) File.should_receive(:exists?).with(File.join("/tmp", @new_resource.creates)).and_return(true) Chef::Log.should_not_receive(:warn) @@ -77,7 +77,7 @@ describe Chef::Provider::Execute do it "should warn if user specified relative path without cwd" do @new_resource.creates "foo_resource" - @provider.stub!(:load_current_resource) + @provider.stub(:load_current_resource) Chef::Log.should_receive(:warn).with(/relative path/) File.should_receive(:exists?).with(@new_resource.creates).and_return(true) @provider.should_not_receive(:shell_out!) |