Class: Rails::TestUnit::CompositeFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/test_unit/runner.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(runnable, filter, patterns) ⇒ CompositeFilter

Returns a new instance of CompositeFilter.



108
109
110
111
112
# File 'lib/rails/test_unit/runner.rb', line 108

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_filterObject (readonly)

Returns the value of attribute named_filter.



106
107
108
# File 'lib/rails/test_unit/runner.rb', line 106

def named_filter
  @named_filter
end

Instance Method Details

#===(method) ⇒ Object

minitest uses === to find matching filters.



115
116
117
# File 'lib/rails/test_unit/runner.rb', line 115

def ===(method)
  @filters.any? { |filter| filter === method }
end