Sha256: 65547bf237a29ffe99ad95aae7a3a83c3b6d4d82b41295e1ec8b9fb080bd1e78
Contents?: true
Size: 584 Bytes
Versions: 14
Compression:
Stored size: 584 Bytes
Contents
require 'gherkin_lint/linter' module GherkinLint # service class to lint for background that does more than setup class BackgroundDoesMoreThanSetup < Linter def lint backgrounds do |file, feature, background| next unless background.key? :steps invalid_steps = background[:steps].select { |step| step[:keyword] == 'When ' || step[:keyword] == 'Then ' } next if invalid_steps.empty? references = [reference(file, feature, background, invalid_steps[0])] add_error(references, 'Just Given Steps allowed') end end end end
Version data entries
14 entries across 14 versions & 1 rubygems