summaryrefslogtreecommitdiff
path: root/spec/unit/util/diff_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/util/diff_spec.rb')
-rw-r--r--spec/unit/util/diff_spec.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/spec/unit/util/diff_spec.rb b/spec/unit/util/diff_spec.rb
index 2dadb5be56..0e3bc0a0d7 100644
--- a/spec/unit/util/diff_spec.rb
+++ b/spec/unit/util/diff_spec.rb
@@ -21,14 +21,6 @@ require 'spec_helper'
require 'tmpdir'
describe Chef::Util::Diff, :uses_diff => true do
- before(:all) do
- @original_config = Chef::Config.hash_dup
- end
-
- after(:all) do
- Chef::Config.configuration = @original_config if @original_config
- end
-
let!(:old_tempfile) { Tempfile.new("chef-util-diff-spec") }
let!(:new_tempfile) { Tempfile.new("chef-util-diff-spec") }
let!(:old_file) { old_tempfile.path }
@@ -393,37 +385,6 @@ describe Chef::Util::Diff, :uses_diff => true do
end
end
- describe "when errors are thrown from shell_out" do
- before do
- differ.stub!(:shell_out).and_raise('boom')
- differ.diff(old_file, new_file)
- end
-
- it "calling for_output should return the error message" do
- expect(differ.for_output).to eql(["Could not determine diff. Error: boom"])
- end
-
- it "calling for_reporting should be nil" do
- expect(differ.for_reporting).to be_nil
- end
- end
-
- describe "when shell_out returns stderr output" do
- before do
- @result = mock('result', :stdout => "", :stderr => "boom")
- differ.stub!(:shell_out).and_return(@result)
- differ.diff(old_file, new_file)
- end
-
- it "calling for_output should return the error message" do
- expect(differ.for_output).to eql(["Could not determine diff. Error: boom"])
- end
-
- it "calling for_reporting should be nil" do
- expect(differ.for_reporting).to be_nil
- end
- end
-
describe "when checking if files are binary or text" do
it "should identify zero-length files as text" do