Sha256: 028bfb12daa0e555986d74e4ef6fdd3ccead5e4e90fa6ca73dafdf1eb8d66998

Contents?: true

Size: 790 Bytes

Versions: 54

Compression:

Stored size: 790 Bytes

Contents

require "parallel_tests/gherkin/runner"

module ParallelTests
  module Cucumber
    class Runner < ParallelTests::Gherkin::Runner
      class << self
        def name
          'cucumber'
        end

        def line_is_result?(line)
          super or line =~ failing_scenario_regex
        end

        def summarize_results(results)
          output = []

          failing_scenarios = results.grep(failing_scenario_regex)
          if failing_scenarios.any?
            failing_scenarios.unshift("Failing Scenarios:")
            output << failing_scenarios.join("\n")
          end

          output << super

          output.join("\n\n")
        end

        private

        def failing_scenario_regex
          /^cucumber features\/.+:\d+/
        end
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 2 rubygems

Version Path
parallel_tests-1.1.1 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.0.9 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.0.8 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.0.7 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.0.6 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.0.5 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.0.4 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.0.3 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.0.2 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.0.1 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.0.0 lib/parallel_tests/cucumber/runner.rb
parallel_tests-0.16.17 lib/parallel_tests/cucumber/runner.rb
parallel_tests-0.16.16 lib/parallel_tests/cucumber/runner.rb
parallel_tests-0.16.15 lib/parallel_tests/cucumber/runner.rb
parallel_tests-0.16.14 lib/parallel_tests/cucumber/runner.rb
parallel_tests-0.16.13 lib/parallel_tests/cucumber/runner.rb
parallel_tests-0.16.12 lib/parallel_tests/cucumber/runner.rb
parallel_tests-0.16.11 lib/parallel_tests/cucumber/runner.rb
parallel_tests-0.16.10 lib/parallel_tests/cucumber/runner.rb
parallel_tests-0.16.9 lib/parallel_tests/cucumber/runner.rb