summaryrefslogtreecommitdiff
path: root/chef
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2009-04-24 17:48:41 -0700
committerAdam Jacob <adam@hjksolutions.com>2009-04-24 17:48:41 -0700
commit800575f8ccf0136e163ef66a241bd2a450994237 (patch)
tree8e0159343277e8b07a7c705b93b5444b61c6253c /chef
parent0e67f1b224400858edfe3fff0345d04ba9aef71f (diff)
downloadchef-800575f8ccf0136e163ef66a241bd2a450994237.tar.gz
Fixing the test for CHEF-186
Diffstat (limited to 'chef')
-rw-r--r--chef/spec/unit/provider/file_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/chef/spec/unit/provider/file_spec.rb b/chef/spec/unit/provider/file_spec.rb
index 5d67c918e9..fff51b6e19 100644
--- a/chef/spec/unit/provider/file_spec.rb
+++ b/chef/spec/unit/provider/file_spec.rb
@@ -191,12 +191,12 @@ describe Chef::Provider::File do
@provider.action_delete
end
- it "should raise an error if it cannot delete the file" do
+ it "should not raise an error if it cannot delete the file because it does not exist" do
@provider.load_current_resource
@provider.stub!(:backup).and_return(true)
@provider.new_resource.stub!(:path).and_return("/tmp/monkeyfoo")
File.should_receive("exists?").with(@provider.new_resource.path).and_return(false)
- lambda { @provider.action_delete }.should raise_error()
+ lambda { @provider.action_delete }.should_not raise_error()
end
it "should update the atime/mtime on action_touch" do
@@ -236,4 +236,4 @@ describe Chef::Provider::File, "action_create_if_missing" do
@provider.should_receive(:action_create).and_return(true)
@provider.action_create_if_missing
end
-end \ No newline at end of file
+end