Sha256: ef5a144c57daff7e5be483f04e21ed82f8c3c0ece4a004d7409baa25b041ff78
Contents?: true
Size: 1.04 KB
Versions: 19
Compression:
Stored size: 1.04 KB
Contents
require "cucumber/filters/gated_receiver" require "cucumber/filters/tag_limits/test_case_index" require "cucumber/filters/tag_limits/verifier" module Cucumber module Filters class TagLimitExceededError < StandardError def initialize(*limit_breaches) super(limit_breaches.map(&:to_s).join("\n")) end end class TagLimits def initialize(tag_limits, receiver=nil) @tag_limits = tag_limits @gated_receiver = GatedReceiver.new(receiver) @test_case_index = TestCaseIndex.new @verifier = Verifier.new(@tag_limits) end def test_case(test_case) gated_receiver.test_case(test_case) test_case_index.add(test_case) self end def done verifier.verify!(test_case_index) gated_receiver.done self end def with_receiver(receiver) self.class.new(@tag_limits, receiver) end private attr_reader :gated_receiver attr_reader :test_case_index attr_reader :verifier end end end
Version data entries
19 entries across 19 versions & 2 rubygems