Sha256: e002e0a524c090c4f0a0b469d3f39686927ca7e43d72afe95d5cec9a2b75e36c

Contents?: true

Size: 460 Bytes

Versions: 5

Compression:

Stored size: 460 Bytes

Contents

require 'chutney/linter'

module Chutney
  # service class to lint for missing verifications
  class MissingVerification < Linter
    def lint
      filled_scenarios do |file, feature, scenario|
        then_steps = scenario[:steps].select { |step| step[:keyword] == 'Then ' }
        next unless then_steps.empty?
        
        references = [reference(file, feature, scenario)]
        add_error(references, 'No \'Then\' step')
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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