Sha256: 76b12434a936e49b2dab8131d27987cb6ad2bedaa5cb9405f2f1dcbd6580b061

Contents?: true

Size: 805 Bytes

Versions: 8

Compression:

Stored size: 805 Bytes

Contents

require File.join(File.dirname(__FILE__), 'parallel_tests')

class ParallelCucumber < ParallelTests
  def self.run_tests(test_files, process_number, options)
    color = ($stdout.tty? ? 'AUTOTEST=1 ; export AUTOTEST ;' : '')#display color when we are in a terminal
    cmd = "#{color} #{executable} #{options} #{test_files*' '}"
    execute_command(cmd, process_number)[:stdout]
  end

  def self.executable
    if bundler_enabled?
      "bundle exec cucumber"
    elsif File.file?("script/cucumber")
      "script/cucumber"
    else
      "cucumber"
    end
  end

  protected

  def self.test_suffix
    ".feature"
  end

  def self.line_is_result?(line)
    line =~ /^\d+ (steps|scenarios)/
  end

  def self.line_is_failure?(line)
    line =~ /^\d+ (steps|scenarios).*(\d{2,}|[1-9]) failed/
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
parallel_tests-0.4.10 lib/parallel_cucumber.rb
parallel_tests-0.4.9 lib/parallel_cucumber.rb
parallel_tests-0.4.8 lib/parallel_cucumber.rb
parallel_tests-0.4.7 lib/parallel_cucumber.rb
parallel_tests-0.4.6 lib/parallel_cucumber.rb
parallel_tests-0.4.5 lib/parallel_cucumber.rb
parallel_tests-0.4.4 lib/parallel_cucumber.rb
parallel_tests-0.4.3 lib/parallel_cucumber.rb