Class: Minitest::Bisect::PathExpander
- Inherits:
-
PathExpander
- Object
- PathExpander
- Minitest::Bisect::PathExpander
- Defined in:
- lib/minitest/bisect.rb
Overview
:nodoc:
Constant Summary collapse
- TEST_GLOB =
:nodoc:
"**/{test_*,*_test,spec_*,*_spec}.rb"
Instance Attribute Summary collapse
-
#rb_flags ⇒ Object
Returns the value of attribute rb_flags.
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:
20 21 22 23 |
# File 'lib/minitest/bisect.rb', line 20 def initialize args = ARGV # :nodoc: super args, TEST_GLOB, "test" self.rb_flags = %w[-Itest:lib] end |
Instance Attribute Details
#rb_flags ⇒ Object
Returns the value of attribute rb_flags.
18 19 20 |
# File 'lib/minitest/bisect.rb', line 18 def rb_flags @rb_flags 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.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/minitest/bisect.rb', line 30 def process_flags flags flags.reject { |flag| # all hits are truthy, so this works out well case flag when /^-I(.*)/ then rb_flags << flag when /^-d/ then rb_flags << flag when /^-w/ then rb_flags << flag else false end } end |