diff options
author | Lamont Granquist <lamont@opscode.com> | 2013-07-03 14:08:30 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@opscode.com> | 2013-07-03 14:08:30 -0700 |
commit | ac754c30552b999c19784d2d402a6f3503d7ddef (patch) | |
tree | de358f4d9b84501f4e39b9f19860783524eadc16 | |
parent | 801c06950fb0c5d87a91b4afc887e765b4311792 (diff) | |
download | chef-ac754c30552b999c19784d2d402a6f3503d7ddef.tar.gz |
this should have been reverted to old behavior, causes failures on
solaris
-rw-r--r-- | lib/chef/util/diff.rb | 1 | ||||
-rw-r--r-- | spec/unit/util/diff_spec.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/util/diff.rb b/lib/chef/util/diff.rb index ba8ef69203..6f76a2fabd 100644 --- a/lib/chef/util/diff.rb +++ b/lib/chef/util/diff.rb @@ -115,6 +115,7 @@ class Chef diff_str.encode!('UTF-8', :invalid => :replace, :undef => :replace, :replace => '?') end @diff = diff_str.split("\n") + @diff.delete("\\ No newline at end of file") return "(diff available)" end elsif !result.stderr.empty? diff --git a/spec/unit/util/diff_spec.rb b/spec/unit/util/diff_spec.rb index 47d9b27a02..2dadb5be56 100644 --- a/spec/unit/util/diff_spec.rb +++ b/spec/unit/util/diff_spec.rb @@ -364,7 +364,7 @@ describe Chef::Util::Diff, :uses_diff => true do end it "calling for_output should return a unified diff" do - differ.for_output.size.should eql(7) + differ.for_output.size.should eql(5) differ.for_output.join("\\n").should match(/\A--- .*\\n\+\+\+ .*\\n@@/m) end |