Improve CLI usage output
* Move -h option at tail; * Add separator between standard and tail options.
This commit is contained in:
@@ -106,20 +106,6 @@ module Uh
|
||||
end
|
||||
|
||||
describe '#parse_arguments!' do
|
||||
context 'with help option' do
|
||||
let(:arguments) { %w[-h] }
|
||||
|
||||
it 'prints the usage banner on standard output' do
|
||||
trap_exit { cli.parse_arguments! }
|
||||
expect(stdout.string).to match /\AUsage: .+/
|
||||
end
|
||||
|
||||
it 'prints options usage on standard output' do
|
||||
trap_exit { cli.parse_arguments! }
|
||||
expect(stdout.string).to match /\n^options:\n\s+-/
|
||||
end
|
||||
end
|
||||
|
||||
context 'with verbose option' do
|
||||
let(:arguments) { %w[-v] }
|
||||
|
||||
@@ -185,6 +171,20 @@ module Uh
|
||||
end
|
||||
end
|
||||
|
||||
context 'with help option' do
|
||||
let(:arguments) { %w[-h] }
|
||||
|
||||
it 'prints the usage banner on standard output' do
|
||||
trap_exit { cli.parse_arguments! }
|
||||
expect(stdout.string).to match /\AUsage: .+/
|
||||
end
|
||||
|
||||
it 'prints options usage on standard output' do
|
||||
trap_exit { cli.parse_arguments! }
|
||||
expect(stdout.string).to match /\n^options:\n\s+-/
|
||||
end
|
||||
end
|
||||
|
||||
context 'with version option' do
|
||||
let(:arguments) { %w[-V] }
|
||||
|
||||
|
Reference in New Issue
Block a user