Sha256: 87d06af03f88d9365e30cac83bad4b50eb7936a7bbc1bf2bc97fec2f13086fef

Contents?: true

Size: 411 Bytes

Versions: 5

Compression:

Stored size: 411 Bytes

Contents

require 'chutney/linter'

module Chutney
  # service class to lint for too many steps
  class TooManySteps < Linter
    def lint
      filled_scenarios do |file, feature, scenario|
        next if scenario[:steps].length < 10
        
        references = [reference(file, feature, scenario)]
        add_error(references, "Scenario is too long at #{scenario[:steps].length} steps")
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chutney-1.6.3 lib/chutney/linter/too_many_steps.rb
chutney-1.6.2 lib/chutney/linter/too_many_steps.rb
chutney-1.6.1 lib/chutney/linter/too_many_steps.rb
chutney-1.6.0 lib/chutney/linter/too_many_steps.rb
chutney-0.5.0 lib/chutney/linter/too_many_steps.rb