Class: Minitest::PathExpander
- Inherits:
-
PathExpander
- Object
- PathExpander
- Minitest::PathExpander
- Defined in:
- lib/minitest/path_expander.rb
Overview
Minitest’s PathExpander to find and filter tests.
Constant Summary collapse
- TEST_GLOB =
:nodoc:
"**/{test_*,*_test,spec_*,*_spec}.rb"
Instance Method Summary collapse
-
#initialize(args = ARGV) ⇒ PathExpander
constructor
:nodoc:.
-
#process_flags(flags) ⇒ Object
Overrides PathExpander#process_flags to filter out ruby flags from minitest flags.
Constructor Details
#initialize(args = ARGV) ⇒ PathExpander
:nodoc:
11 12 13 |
# File 'lib/minitest/path_expander.rb', line 11 def initialize args = ARGV # :nodoc: super args, TEST_GLOB, "test" end |
Instance Method Details
#process_flags(flags) ⇒ Object
Overrides PathExpander#process_flags to filter out ruby flags from minitest flags. Only supports -I<paths>, -d, and -w for ruby.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/minitest/path_expander.rb', line 20 def process_flags flags flags.reject { |flag| # all hits are truthy, so this works out well case flag when /^-I(.*)/ then $LOAD_PATH.concat $1.split(/:/) when /^-d/ then $DEBUG = true when /^-w/ then $VERBOSE = true else false end } end |