Accept -l LAYOUT CLI option to set the layout
This commit is contained in:
@@ -130,6 +130,15 @@ module Uh
|
||||
end
|
||||
end
|
||||
|
||||
context 'with layout option' do
|
||||
let(:arguments) { %w[-l Object] }
|
||||
|
||||
it 'assigns the layout class in the env' do
|
||||
cli.parse_arguments!
|
||||
expect(cli.env.layout_class).to eq Object
|
||||
end
|
||||
end
|
||||
|
||||
context 'with invalid option' do
|
||||
let(:arguments) { %w[--unknown-option] }
|
||||
|
||||
|
@@ -13,6 +13,10 @@ module Uh
|
||||
expect(env).not_to be_debug
|
||||
end
|
||||
|
||||
it 'has no layout_class set' do
|
||||
expect(env.layout_class).not_to be
|
||||
end
|
||||
|
||||
describe '#verbose?' do
|
||||
context 'when verbose mode is disabled' do
|
||||
before { env.verbose = false }
|
||||
|
Reference in New Issue
Block a user