Skip to content

Commit 4ac6992

Browse files
committed
Strip off informational message from logger
1 parent 818f8d6 commit 4ac6992

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

spec/octocatalog-diff/tests/cli_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
expect(result).to eq(0)
4040
expect(logger_str.string).not_to match(/DEBUG/)
4141

42-
logger_str.truncate(0)
42+
logger, logger_str = OctocatalogDiff::Spec.setup_logger
4343
result2 = OctocatalogDiff::Cli.cli(default_argv.dup, logger, debug: true)
4444
expect(result2).to eq(0)
4545
expect(logger_str.string).to match(/DEBUG -- : Generating colored text output/)

spec/octocatalog-diff/tests/spec_helper.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ def initialize
4545
end
4646

4747
def string
48-
@content ||= File.read(File.join(@log_tempdir, 'customlogger.out'))
48+
@content ||= begin
49+
content = File.read(File.join(@log_tempdir, 'customlogger.out'))
50+
content.sub(/\A# Logfile created .+\n/, '')
51+
end
4952
end
5053
end
5154

0 commit comments

Comments
 (0)