diff options
| author | Ash McKenzie <amckenzie@gitlab.com> | 2018-09-13 14:55:11 +1000 |
|---|---|---|
| committer | Ash McKenzie <amckenzie@gitlab.com> | 2018-09-13 14:55:11 +1000 |
| commit | 4656cd714f04f30d4542e57d46434829a09ff696 (patch) | |
| tree | 986fdee19f31ac228981e952dd22b74e2760e9ec /spec/action | |
| parent | 58acc2b668e86946c58db4dd41d50edceb7218f9 (diff) | |
| download | gitlab-shell-4656cd714f04f30d4542e57d46434829a09ff696.tar.gz | |
Print message to $stderr for custom action
Diffstat (limited to 'spec/action')
| -rw-r--r-- | spec/action/custom_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/action/custom_spec.rb b/spec/action/custom_spec.rb index c3224a6..24c6ce8 100644 --- a/spec/action/custom_spec.rb +++ b/spec/action/custom_spec.rb @@ -52,6 +52,12 @@ describe Action::Custom do allow($stdout).to receive(:print).with('push-result') end + it 'prints a message to $stderr' do + VCR.use_cassette("custom-action-ok-with-message") do + expect { subject.execute }.to output(/NOTE: Message here/).to_stderr + end + end + it 'returns an instance of Net::HTTPCreated' do VCR.use_cassette("custom-action-ok") do expect(subject.execute ).to be_instance_of(Net::HTTPCreated) |
