summaryrefslogtreecommitdiff
path: root/spec/unit/data_collector_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-06-29 10:36:32 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-06-29 10:36:32 -0700
commita0494b461fdac465e532f84efee0a4c5e70b65fb (patch)
tree4805c7b5d4b42dc3b6e7ce08b900b3d9b85bedd0 /spec/unit/data_collector_spec.rb
parent4e39c729c5981067c028bd3abcb50b066d760a28 (diff)
downloadchef-a0494b461fdac465e532f84efee0a4c5e70b65fb.tar.gz
Suppress data_collector.json spec turd file
Our unit tests keep creating this file that dirties the repo Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/data_collector_spec.rb')
-rw-r--r--spec/unit/data_collector_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/unit/data_collector_spec.rb b/spec/unit/data_collector_spec.rb
index a469808e63..f8a9e374e5 100644
--- a/spec/unit/data_collector_spec.rb
+++ b/spec/unit/data_collector_spec.rb
@@ -2,7 +2,7 @@
# Author:: Adam Leff (<adamleff@chef.io)
# Author:: Ryan Cragun (<ryan@chef.io>)
#
-# Copyright:: Copyright 2012-2016, Chef Software Inc.
+# Copyright:: Copyright 2012-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -804,6 +804,7 @@ describe Chef::DataCollector::Reporter do
context "when valid output_locations are provided" do
it "does not raise an exception" do
+ expect(reporter).to receive(:open).with("data_collection.json", "a")
Chef::Config[:data_collector][:output_locations] = { :urls => ["http://data_collector"], :files => ["data_collection.json"] }
expect { reporter.send(:validate_data_collector_output_locations!) }.not_to raise_error(Chef::Exceptions::ConfigurationError)
end