File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1+ Feature : Help
2+
3+ Running `cucumber --help` shows you command-line options.
4+
5+ Scenario : Show help
6+ When I run `cucumber --help`
7+ Then it should pass
8+ And I should see the CLI help
Original file line number Diff line number Diff line change 1+ Then ( /^I should see the CLI help$/ ) do
2+ expect ( all_output ) . to include ( "Usage:" )
3+ end
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ def parse!(args)
135135 end
136136
137137 opts . on_tail ( "--version" , "Show version." ) { show_version }
138- opts . on_tail ( "-h" , "--help" , "You're looking at it." ) { show_help }
138+ opts . on_tail ( "-h" , "--help" , "You're looking at it." ) { show_help ( opts . help ) }
139139 end . parse!
140140
141141 @args . map! { |a | "#{ a } :#{ @options [ :lines ] } " } if @options [ :lines ]
@@ -365,8 +365,8 @@ def set_dry_run_and_duration
365365 @options [ :duration ] = false
366366 end
367367
368- def show_help
369- @out_stream . puts opts . help
368+ def show_help ( text )
369+ @out_stream . puts text
370370 Kernel . exit ( 0 )
371371 end
372372
You can’t perform that action at this time.
0 commit comments