class Mutiny::Tests::TestSet
Attributes
tests[R]
Public Class Methods
empty()
click to toggle source
# File lib/mutiny/tests/test_set.rb, line 11 def self.empty new([]) end
new(tests)
click to toggle source
# File lib/mutiny/tests/test_set.rb, line 15 def initialize(tests) @tests = tests end
Public Instance Methods
eql?(other)
click to toggle source
# File lib/mutiny/tests/test_set.rb, line 31 def eql?(other) is_a?(other.class) && other.tests == tests end
Also aliased as: ==
filterable(subjects, filtering_strategy: Filter::Default)
click to toggle source
# File lib/mutiny/tests/test_set.rb, line 35 def filterable(subjects, filtering_strategy: Filter::Default) extend(Filterable) self.filter = filtering_strategy.new(subject_names: subjects.names) self end
locations()
click to toggle source
# File lib/mutiny/tests/test_set.rb, line 19 def locations tests.map(&:location) end
subset(&block)
click to toggle source
# File lib/mutiny/tests/test_set.rb, line 23 def subset(&block) derive(tests.select(&block)) end
take(n)
click to toggle source
# File lib/mutiny/tests/test_set.rb, line 27 def take(n) derive(tests.take(n)) end
Protected Instance Methods
derive(tests)
click to toggle source
# File lib/mutiny/tests/test_set.rb, line 47 def derive(tests) self.class.new(tests).tap do |derived| if respond_to?(:filter) derived.extend(Filterable) derived.filter = filter end end end