Skip to content

Commit

Permalink
Remove spaces in --only-group flag documentation (#795)
Browse files Browse the repository at this point in the history
optparse documentation says that Array type flags are "Strings separated
by ',' (e.g. 1,2,3)". And indeed `--only-group 1, 2, 3` only tests group
1.

https://ruby-doc.org/stdlib-2.6.6/libdoc/optparse/rdoc/OptionParser.html
  • Loading branch information
bquorning committed Jan 5, 2021
1 parent ca3c936 commit 2a60b39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Options are:
-i, --isolate Do not run any other tests in the group used by --single(-s).
Automatically turned on if --isolate-n is set above 0.
--isolate-n Number of processes for isolated groups. Default to 1 when --isolate is on.
--only-group INT[, INT]
--only-group INT[,INT]
-e, --exec [COMMAND] execute this code parallel and with ENV['TEST_ENV_NUMBER']
-o, --test-options '[OPTIONS]' execute test commands with those options
-t, --type [TYPE] test(default) / rspec / cucumber / spinach
Expand Down
2 changes: 1 addition & 1 deletion lib/parallel_tests/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def parse_options!(argv)
options[:isolate_count] = n
end

opts.on("--only-group INT[, INT]", Array) { |groups| options[:only_group] = groups.map(&:to_i) }
opts.on("--only-group INT[,INT]", Array) { |groups| options[:only_group] = groups.map(&:to_i) }

opts.on("-e", "--exec [COMMAND]", "execute this code parallel and with ENV['TEST_ENV_NUMBER']") { |path| options[:execute] = path }
opts.on("-o", "--test-options '[OPTIONS]'", "execute test commands with those options") { |arg| options[:test_options] = arg.lstrip }
Expand Down

0 comments on commit 2a60b39

Please sign in to comment.