summaryrefslogtreecommitdiff
path: root/spec/unit/util
diff options
context:
space:
mode:
authorLamont Granquist <lamont@opscode.com>2013-03-29 14:39:30 -0700
committerLamont Granquist <lamont@opscode.com>2013-03-29 14:39:30 -0700
commitfdf28372bd7f89e9a3d991f42e761dc3df838b78 (patch)
tree07b9f3d0bb96195783ecd5bdea1f330753549ee9 /spec/unit/util
parent87d4123053cb10254f3352c1f5fd8eef508b1e9d (diff)
downloadchef-fdf28372bd7f89e9a3d991f42e761dc3df838b78.tar.gz
add back diffing against no file for why-run mode
Diffstat (limited to 'spec/unit/util')
-rw-r--r--spec/unit/util/diff_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/util/diff_spec.rb b/spec/unit/util/diff_spec.rb
index a856902c9b..4cc72c0006 100644
--- a/spec/unit/util/diff_spec.rb
+++ b/spec/unit/util/diff_spec.rb
@@ -44,16 +44,16 @@ describe Chef::Util::Diff, :uses_diff => true do
expect(differ).to be_a_kind_of(Chef::Util::Diff)
end
- it "should raise an exception if the old_file does not exist" do
+ it "produces a diff even if the old_file does not exist" do
old_tempfile.close
old_tempfile.unlink
- expect { differ.diff(old_file, new_file) }.to raise_error
+ expect(differ.for_output).to eql(["(no diff)"])
end
- it "should raise an exception if the new_file does not exist" do
+ it "produces a diff even if the new_file does not exist" do
new_tempfile.close
new_tempfile.unlink
- expect { differ.diff(old_file, new_file) }.to raise_error
+ expect(differ.for_output).to eql(["(no diff)"])
end
describe "when the two files exist with no content" do