summaryrefslogtreecommitdiff
path: root/spec/unit/knife/user_show_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/knife/user_show_spec.rb')
-rw-r--r--spec/unit/knife/user_show_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/knife/user_show_spec.rb b/spec/unit/knife/user_show_spec.rb
index af8485ad7d..f97cbc3f13 100644
--- a/spec/unit/knife/user_show_spec.rb
+++ b/spec/unit/knife/user_show_spec.rb
@@ -27,15 +27,15 @@ describe Chef::Knife::UserShow do
end
it 'loads and displays the user' do
- Chef::User.should_receive(:load).with('my_user').and_return(@user_mock)
- @knife.should_receive(:format_for_display).with(@user_mock)
+ expect(Chef::User).to receive(:load).with('my_user').and_return(@user_mock)
+ expect(@knife).to receive(:format_for_display).with(@user_mock)
@knife.run
end
it 'prints usage and exits when a user name is not provided' do
@knife.name_args = []
- @knife.should_receive(:show_usage)
- @knife.ui.should_receive(:fatal)
- lambda { @knife.run }.should raise_error(SystemExit)
+ expect(@knife).to receive(:show_usage)
+ expect(@knife.ui).to receive(:fatal)
+ expect { @knife.run }.to raise_error(SystemExit)
end
end