Sha256: 3b223c7f0389992c0d8dbaa471f363d66f753bd5fb1eb0923e9df8b558c918ba

Contents?: true

Size: 890 Bytes

Versions: 5

Compression:

Stored size: 890 Bytes

Contents

module Cucumber
  module Formatter

    # Adapter between Cucumber::Core::Test::Runner's Report API and 
    # Cucumber's event bus
    class EventBusReport
      attr_reader :config
      private :config

      def initialize(config)
        @config = config
      end

      def before_test_case(test_case)
        @config.notify Events::BeforeTestCase.new(test_case)
        @test_case = test_case
      end

      def before_test_step(test_step)
        @config.notify Events::BeforeTestStep.new(@test_case, test_step)
      end

      def after_test_step(test_step, result)
        @config.notify Events::AfterTestStep.new(@test_case, test_step, result)
      end

      def after_test_case(test_case, result)
        @config.notify Events::AfterTestCase.new(test_case, result)
      end

      def done
        @config.notify Events::FinishedTesting.new
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
cucumber-2.99.0 lib/cucumber/formatter/event_bus_report.rb
mobiusloop-0.1.5 lib/cucumber/formatter/event_bus_report.rb
cucumber-2.4.0 lib/cucumber/formatter/event_bus_report.rb
mobiusloop-0.1.3 lib/cucumber/formatter/event_bus_report.rb
mobiusloop-0.1.2 lib/cucumber/formatter/event_bus_report.rb