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.8.0 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.7.1 lib/parallel_tests/cucumber/runner.rb
vinted-parallel_tests-1.7.0.1 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.7.0 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.6.2 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.6.1 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.6.0 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.5.1 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.5.0 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.3.9 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.3.8 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.3.7 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.3.6 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.3.5 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.3.4 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.3.3 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.3.2 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.3.1 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.3.0 lib/parallel_tests/cucumber/runner.rb
parallel_tests-1.2.0 lib/parallel_tests/cucumber/runner.rb