Class: Cucumber::Filters::TagLimits::Verifier::Breach

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/filters/tag_limits/verifier.rb

Constant Summary collapse

INDENT =
(' ' * 2).freeze

Instance Method Summary collapse

Constructor Details

#initialize(tag_name, limit, locations) ⇒ Breach

Returns a new instance of Breach.



31
32
33
34
35
# File 'lib/cucumber/filters/tag_limits/verifier.rb', line 31

def initialize(tag_name, limit, locations)
  @tag_name = tag_name
  @limit = limit
  @locations = locations
end

Instance Method Details

#to_sObject



37
38
39
40
41
42
# File 'lib/cucumber/filters/tag_limits/verifier.rb', line 37

def to_s
  [
    "#{tag_name} occurred #{tag_count} times, but the limit was set to #{limit}",
    *locations.map(&:to_s)
  ].join("\n#{INDENT}")
end