Implement verbose mode

This commit is contained in:
Thibault Jouan
2015-04-09 11:17:26 +00:00
parent 404b34acc0
commit 254efe4f74
7 changed files with 64 additions and 11 deletions

View File

@@ -88,6 +88,20 @@ module Uh
end
end
context 'with verbose option' do
let(:arguments) { %w[-v] }
it 'sets the env as verbose' do
cli.parse_arguments!
expect(cli.env).to be_verbose
end
it 'tells the env to log its logger level' do
expect(cli.env).to receive :log_logger_level
cli.parse_arguments!
end
end
context 'with invalid option' do
let(:arguments) { %w[--unknown-option] }