Sha256: b4fd9d8551db7043f1426c475cd66c04cab38dd72a5f1349866692209624ab12
Contents?: true
Size: 549 Bytes
Versions: 7
Compression:
Stored size: 549 Bytes
Contents
require_relative '../spec_helper' require 'cliutils/ext/logger_extensions' describe Logger do it 'allows custom levels to be attached' do l = Logger.new(STDOUT) l.formatter = proc do |severity, datetime, progname, msg| puts "#{ severity }: #{ msg }" end out = capture_stdout { l.prompt('test') } expect(out).to eq("PROMPT: test\n") out = capture_stdout { l.section('test') } expect(out).to eq("SECTION: test\n") out = capture_stdout { l.success('test') } expect(out).to eq("SUCCESS: test\n") end end
Version data entries
7 entries across 7 versions & 1 rubygems