Sha256: 1cea33446d3a620f83427d69caea57b02b0555d595222c17b366c5aff599adfb
Contents?: true
Size: 1.03 KB
Versions: 30
Compression:
Stored size: 1.03 KB
Contents
# frozen_string_literal: true require 'cucumber/core/filter' module Cucumber module Core module Test class TagFilter < Filter.new(:filter_expressions) def test_case(test_case) test_cases << test_case if test_case.match_tags?(filter_expressions) test_case.describe_to(receiver) end self end def done receiver.done self end private def test_cases @test_cases ||= TestCases.new end class TestCases attr_reader :test_cases_by_tag_name private :test_cases_by_tag_name def initialize @test_cases_by_tag_name = Hash.new { [] } end def <<(test_case) test_case.tags.each do |tag| test_cases_by_tag_name[tag.name] += [test_case] end self end def with_tag_name(tag_name) test_cases_by_tag_name[tag_name] end end end end end end
Version data entries
30 entries across 30 versions & 4 rubygems