# File lib/cucumber/step_mother.rb, line 83 def check_tag_limits(tag_counts) error_messages = [] options[:tag_expression].limits.each do |tag_name, tag_limit| tag_locations = (tag_counts[tag_name] || []) tag_count = tag_locations.length if tag_count > tag_limit error = "#{tag_name} occurred #{tag_count} times, but the limit was set to #{tag_limit}\n " + tag_locations.join("\n ") error_messages << error end end raise TagExcess.new(error_messages) if error_messages.any? end