diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-08-15 16:12:13 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-08-15 16:12:13 -0500 |
commit | 03055503802193e155f9b1267e55cdbdd8125060 (patch) | |
tree | 828cb90fdd32846b03899886d0f3e300cc33b044 | |
parent | 9fc978490edb79a6dd8a5adc977f72acbb8ddefc (diff) | |
download | gitlab-shell-03055503802193e155f9b1267e55cdbdd8125060.tar.gz |
Use `output` matcher in one test
-rw-r--r-- | spec/gitlab_keys_spec.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/spec/gitlab_keys_spec.rb b/spec/gitlab_keys_spec.rb index 123f80e..87492d8 100644 --- a/spec/gitlab_keys_spec.rb +++ b/spec/gitlab_keys_spec.rb @@ -118,10 +118,7 @@ describe GitlabKeys do end it 'outputs the key IDs, separated by newlines' do - output = capture_stdout do - gitlab_keys.send(:list_key_ids) - end - expect(output).to match "1\n2\n3\n9000" + expect { gitlab_keys.send(:list_key_ids) }.to output("1\n2\n3\n9000\n").to_stdout end end |