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


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

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

Instance Method Details

#to_sObject


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

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