Sha256: 4bb3f9480ec4e8d2e0e4db9583d18719c69222a68e9530d4559c1166827bc36a
Contents?: true
Size: 869 Bytes
Versions: 8
Compression:
Stored size: 869 Bytes
Contents
require_relative 'dry_run_formatter' module Kymera module Cucumber class TestParser def initialize(tests, options) @tests = tests @options = options end def parse_tests tests = dry_run(["cucumber", @tests, '--dry-run -f DryRunFormatter', @options].compact.join(" ")).split("\n") refined_tests =[] tests.delete_at(0) if tests[0].downcase.include?('using') tests.each do |test| refined_tests << test.gsub('\\','/') end $stdout << "The number of scenarios found to be executed: #{refined_tests.count}" $stdout << "\n" refined_tests end private def dry_run(cmd) $stdout << "Preprocessing test files" $stdout << "\n" tr = Thread.new(cmd) { |c| `#{c}`} tr.join tr.value end end end end
Version data entries
8 entries across 8 versions & 1 rubygems