Sha256: f3227ee8d27d1d68ce601cfd3b8f39a6ede38cd5f7f6dd9a81464dcf096db3a5

Contents?: true

Size: 641 Bytes

Versions: 39

Compression:

Stored size: 641 Bytes

Contents

# frozen_string_literal: true

require 'cucumber/formatter/io'
require 'cucumber/formatter/console'

module Cucumber
  module Formatter
    class FailFast
      def initialize(configuration)
        @previous_test_case = nil
        configuration.on_event :test_case_finished do |event|
          test_case, result = *event.attributes
          if test_case != @previous_test_case
            @previous_test_case = event.test_case
            Cucumber.wants_to_quit = true unless result.ok?(configuration.strict)
          elsif result.passed?
            Cucumber.wants_to_quit = false
          end
        end
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 4 rubygems

Version Path
cucumber-9.1.2 lib/cucumber/formatter/fail_fast.rb
cucumber-9.1.1 lib/cucumber/formatter/fail_fast.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/cucumber-9.1.0/lib/cucumber/formatter/fail_fast.rb
cucumber-9.1.0 lib/cucumber/formatter/fail_fast.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/cucumber-9.0.2/lib/cucumber/formatter/fail_fast.rb
cucumber-9.0.2 lib/cucumber/formatter/fail_fast.rb
cucumber-9.0.1 lib/cucumber/formatter/fail_fast.rb
cucumber-9.0.0 lib/cucumber/formatter/fail_fast.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/fail_fast.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/fail_fast.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/fail_fast.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/fail_fast.rb
cucumber-8.0.0 lib/cucumber/formatter/fail_fast.rb
cucumber-8.0.0.rc.1 lib/cucumber/formatter/fail_fast.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/cucumber-7.1.0/lib/cucumber/formatter/fail_fast.rb
cucumber-7.1.0 lib/cucumber/formatter/fail_fast.rb
cucumber-7.0.0 lib/cucumber/formatter/fail_fast.rb
cucumber-6.1.0 lib/cucumber/formatter/fail_fast.rb
cucumber-6.0.0 lib/cucumber/formatter/fail_fast.rb
cucumber-5.3.0 lib/cucumber/formatter/fail_fast.rb