Refactor and simplify CLI and Env:

* Do not modify Env logger from CLI;
* Add verbose attribute to Env;
* Implement Env#verbose?;
* Remove Env#log_level and Env#log_level=;
* Refactor related specs, improve some wording.
This commit is contained in:
Thibault Jouan
2014-05-25 17:44:24 +00:00
parent 0db2d90b72
commit 39427c35c3
4 changed files with 51 additions and 50 deletions

View File

@@ -108,15 +108,15 @@ module Producer::Core
end
context 'verbose' do
it 'sets env logger level to INFO' do
expect(cli.env.log_level).to eq Logger::INFO
it 'enables env verbose mode' do
expect(cli.env).to be_verbose
end
end
context 'dry run' do
let(:options) { %w[-n] }
it 'enables env dry run' do
it 'enables env dry run mode' do
expect(cli.env).to be_dry_run
end
end