summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-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