diff options
author | Lamont Granquist <lamont@opscode.com> | 2013-03-29 14:39:30 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@opscode.com> | 2013-03-29 14:39:30 -0700 |
commit | fdf28372bd7f89e9a3d991f42e761dc3df838b78 (patch) | |
tree | 07b9f3d0bb96195783ecd5bdea1f330753549ee9 /spec/unit/util | |
parent | 87d4123053cb10254f3352c1f5fd8eef508b1e9d (diff) | |
download | chef-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.rb | 8 |
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 |