Sha256: c397ad04004362426dbc15d72553b69b7d968c621d221a076c906c5ab9bfb816

Contents?: true

Size: 839 Bytes

Versions: 6

Compression:

Stored size: 839 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
      end
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cucumber-2.3.3 lib/cucumber/formatter/event_bus_report.rb
cucumber-2.3.2 lib/cucumber/formatter/event_bus_report.rb
cucumber-2.3.1 lib/cucumber/formatter/event_bus_report.rb
cucumber-2.3.0 lib/cucumber/formatter/event_bus_report.rb
cucumber-2.2.0 lib/cucumber/formatter/event_bus_report.rb
cucumber-2.1.0 lib/cucumber/formatter/event_bus_report.rb