diff options
| author | Jacob Vosmaer <jacob@gitlab.com> | 2018-03-14 10:54:55 +0100 |
|---|---|---|
| committer | Jacob Vosmaer <jacob@gitlab.com> | 2018-03-14 10:54:55 +0100 |
| commit | eac4c1bfcd6c7d19caff23713bb6e16f236859b6 (patch) | |
| tree | a2004f5ce74bb58f52f140ccc431416deedc4675 | |
| parent | 3464afcd14f0e916fd955a1af3b9762350cfd0cf (diff) | |
| download | gitlab-shell-eac4c1bfcd6c7d19caff23713bb6e16f236859b6.tar.gz | |
Improve rspec logging tests
| -rw-r--r-- | spec/gitlab_logger_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/gitlab_logger_spec.rb b/spec/gitlab_logger_spec.rb index 0488739..ef5f33d 100644 --- a/spec/gitlab_logger_spec.rb +++ b/spec/gitlab_logger_spec.rb @@ -63,6 +63,12 @@ describe GitlabLogger do end describe '#debug' do + it 'does nothing' do + subject.debug('hello') + + expect(output.string).to eq('') + end + context 'when the log level is low enough' do let(:level) { Logger::DEBUG } @@ -77,7 +83,7 @@ describe GitlabLogger do describe 'json logging' do let(:format) { 'json' } - it 'works' do + it 'writes valid JSON data' do subject.info('hello', foo: 'bar') expect(JSON.parse(first_line)).to eq( |
