File tree 3 files changed +14
-3
lines changed
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)
135
135
end
136
136
137
137
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 ) }
139
139
end . parse!
140
140
141
141
@args . map! { |a | "#{ a } :#{ @options [ :lines ] } " } if @options [ :lines ]
@@ -365,8 +365,8 @@ def set_dry_run_and_duration
365
365
@options [ :duration ] = false
366
366
end
367
367
368
- def show_help
369
- @out_stream . puts opts . help
368
+ def show_help ( text )
369
+ @out_stream . puts text
370
370
Kernel . exit ( 0 )
371
371
end
372
372
You can’t perform that action at this time.
0 commit comments