summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-02-01 14:15:16 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2021-02-01 14:15:16 -0800
commit81f61427d9443e5322594e52034c1f829c810d2d (patch)
tree19cfacc498e1d929643ab7c2c9a8233619187770
parent28540abf8f3c07f0463e5050458602cbb70481b6 (diff)
downloadchef-81f61427d9443e5322594e52034c1f829c810d2d.tar.gz
remove unnecessary stubs and clean up output
some garbage was getting output on stderr from the first block of tests Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--spec/unit/knife/supermarket_share_spec.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/unit/knife/supermarket_share_spec.rb b/spec/unit/knife/supermarket_share_spec.rb
index 9e9d520540..088cef9dfd 100644
--- a/spec/unit/knife/supermarket_share_spec.rb
+++ b/spec/unit/knife/supermarket_share_spec.rb
@@ -46,7 +46,9 @@ describe Chef::Knife::SupermarketShare do
allow(@knife).to receive(:shell_out!).and_return(true)
@stdout = StringIO.new
+ @stderr = StringIO.new
allow(@knife.ui).to receive(:stdout).and_return(@stdout)
+ allow(@knife.ui).to receive(:stderr).and_return(@stderr)
end
describe "run" do
@@ -153,7 +155,6 @@ describe Chef::Knife::SupermarketShare do
end
it "does not upload the cookbook" do
- allow(@knife).to receive(:shell_out!).and_return(@so)
expect(@knife).not_to receive(:do_upload)
@knife.run
end
@@ -166,10 +167,6 @@ describe Chef::Knife::SupermarketShare do
@upload_response = double("Net::HTTPResponse")
allow(Chef::CookbookSiteStreamingUploader).to receive(:post).and_return(@upload_response)
- @stdout = StringIO.new
- @stderr = StringIO.new
- allow(@knife.ui).to receive(:stdout).and_return(@stdout)
- allow(@knife.ui).to receive(:stderr).and_return(@stderr)
allow(File).to receive(:open).and_return(true)
end