Class: Rails::TestUnit::CompositeFilter
- Defined in:
- railties/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.
119 120 121 122 123 |
# File 'railties/lib/rails/test_unit/runner.rb', line 119 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
117 118 119 |
# File 'railties/lib/rails/test_unit/runner.rb', line 117 def named_filter @named_filter end |
Instance Method Details
#===(method) ⇒ Object
minitest uses === to find matching filters.
126 127 128 |
# File 'railties/lib/rails/test_unit/runner.rb', line 126 def ===(method) @filters.any? { |filter| filter === method } end |