From f3a436d4b20280e3bdfb4421b3ab97d9828cdff1 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Wed, 23 Apr 2014 16:00:10 -0700 Subject: Supress stdout/err output from knife tests --- spec/unit/knife/user_edit_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/unit/knife/user_edit_spec.rb') diff --git a/spec/unit/knife/user_edit_spec.rb b/spec/unit/knife/user_edit_spec.rb index d5b380a12f..20a4c0d9e9 100644 --- a/spec/unit/knife/user_edit_spec.rb +++ b/spec/unit/knife/user_edit_spec.rb @@ -20,8 +20,13 @@ require 'spec_helper' describe Chef::Knife::UserEdit do before(:each) do + @stderr = StringIO.new + @stdout = StringIO.new + Chef::Knife::UserEdit.load_deps @knife = Chef::Knife::UserEdit.new + @knife.ui.stub(:stderr).and_return(@stderr) + @knife.ui.stub(:stdout).and_return(@stdout) @knife.name_args = [ 'my_user' ] @knife.config[:disable_editing] = true end -- cgit v1.2.1