Class: Rails::TestUnit::CompositeFilter
- Inherits:
-
Object
- Object
- Rails::TestUnit::CompositeFilter
- Defined in:
- lib/rails/test_unit/runner.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#named_filter ⇒ Object
readonly
Returns the value of attribute named_filter.
Instance Method Summary collapse
-
#===(method) ⇒ Object
Minitest uses === to find matching filters.
-
#initialize(runnable, filter, patterns) ⇒ CompositeFilter
constructor
A new instance of CompositeFilter.
Constructor Details
#initialize(runnable, filter, patterns) ⇒ CompositeFilter
Returns a new instance of CompositeFilter.
84 85 86 87 88 |
# File 'lib/rails/test_unit/runner.rb', line 84 def initialize(runnable, filter, patterns) @runnable = runnable @named_filter = derive_named_filter(filter) @filters = [ @named_filter, *derive_line_filters(patterns) ].compact end |
Instance Attribute Details
#named_filter ⇒ Object (readonly)
Returns the value of attribute named_filter.
82 83 84 |
# File 'lib/rails/test_unit/runner.rb', line 82 def named_filter @named_filter end |
Instance Method Details
#===(method) ⇒ Object
Minitest uses === to find matching filters.
91 92 93 |
# File 'lib/rails/test_unit/runner.rb', line 91 def ===(method) @filters.any? { |filter| filter === method } end |