diff options
author | tylercloke <tylercloke@gmail.com> | 2015-06-02 16:54:21 -0700 |
---|---|---|
committer | tylercloke <tylercloke@gmail.com> | 2015-06-05 10:38:49 -0700 |
commit | 4f2400c8cce57e68f14cb9d4b756ab82b23dd69d (patch) | |
tree | 836ac3d3f71ec2ab234f975d2ed2f4fad93e94a5 /spec/unit/knife/user_list_spec.rb | |
parent | eb49eedb6333bc1c6b82d0c7befffb9188c5b523 (diff) | |
download | chef-4f2400c8cce57e68f14cb9d4b756ab82b23dd69d.tar.gz |
Backwards compatible support for OSC 11 in knife user commands.
All knife user commands can detect when they have failed for OSC 11 reasons and forward the request to backwards compatible knife osc_user commands.
Diffstat (limited to 'spec/unit/knife/user_list_spec.rb')
-rw-r--r-- | spec/unit/knife/user_list_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/unit/knife/user_list_spec.rb b/spec/unit/knife/user_list_spec.rb index db097a5c16..9990cc802d 100644 --- a/spec/unit/knife/user_list_spec.rb +++ b/spec/unit/knife/user_list_spec.rb @@ -19,14 +19,18 @@ require 'spec_helper' describe Chef::Knife::UserList do + let(:knife) { Chef::Knife::UserList.new } + let(:stdout) { StringIO.new } + before(:each) do Chef::Knife::UserList.load_deps - @knife = Chef::Knife::UserList.new + allow(knife.ui).to receive(:stderr).and_return(stdout) + allow(knife.ui).to receive(:stdout).and_return(stdout) end it 'lists the users' do expect(Chef::User).to receive(:list) - expect(@knife).to receive(:format_list_for_display) - @knife.run + expect(knife).to receive(:format_list_for_display) + knife.run end end |