class Cucumber::Core::Test::LocationsFilter

Sorts and filters scenarios based on a list of locations

Public Instance Methods

done() click to toggle source
# File lib/cucumber/core/test/filters/locations_filter.rb, line 15
def done
  sorted_test_cases.each do |test_case|
    test_case.describe_to receiver
  end
  receiver.done
  self
end
test_case(test_case) click to toggle source
# File lib/cucumber/core/test/filters/locations_filter.rb, line 10
def test_case(test_case)
  test_cases[test_case.location.file] << test_case
  self
end

Private Instance Methods

sorted_test_cases() click to toggle source
# File lib/cucumber/core/test/filters/locations_filter.rb, line 25
def sorted_test_cases
  filter_locations.map { |filter_location|
    test_cases[filter_location.file].select { |test_case|
      filter_location.match?(test_case.location)
    }
  }.flatten.uniq
end
test_cases() click to toggle source
# File lib/cucumber/core/test/filters/locations_filter.rb, line 33
def test_cases
  @test_cases ||= Hash.new { |hash, key| hash[key] = [] }
end