Skip to content

Commit

Permalink
Added --base-directory option
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jul 25, 2019
1 parent f5ea054 commit 4c1db84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tool/lib/test/unit.rb
Expand Up @@ -856,6 +856,10 @@ module GlobOption # :nodoc: all
def setup_options(parser, options)
super
parser.separator "globbing options:"
parser.on '-B', '--base-directory DIR', 'Base directory to glob.' do |dir|
raise OptionParser::InvalidArgument, "not a directory: #{dir}" unless File.directory?(dir)
options[:base_directory] = dir
end
parser.on '-x', '--exclude REGEXP', 'Exclude test files on pattern.' do |pattern|
(options[:reject] ||= []) << pattern
end
Expand Down

0 comments on commit 4c1db84

Please sign in to comment.