Sha256: 2c3c0ccfce75e323dc4634949f0813d3809d968e52d09ad9516e05f5ede7e5af

Contents?: true

Size: 871 Bytes

Versions: 10

Compression:

Stored size: 871 Bytes

Contents

require 'cucumber/gherkin/i18n'

module Cucumber
  module Formatter
    module LegacyApi

      # This is what's passed to the constructor of the formatters
      class RuntimeFacade < Struct.new(:results, :support_code, :configuration)
        def unmatched_step_definitions
          support_code.unmatched_step_definitions
        end

        def snippet_text(step_keyword, step_name, multiline_arg) #:nodoc:
          keyword = Cucumber::Gherkin::I18n.code_keyword_for(step_keyword).strip
          configuration.snippet_generators.map { |generator|
            generator.call(keyword, step_name, multiline_arg, configuration.snippet_type)
          }.join("\n")
        end

        def scenarios(status = nil)
          results.scenarios(status)
        end

        def steps(status = nil)
          results.steps(status)
        end
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
cucumber-2.99.0 lib/cucumber/formatter/legacy_api/runtime_facade.rb
mobiusloop-0.1.5 lib/cucumber/formatter/legacy_api/runtime_facade.rb
cucumber-2.4.0 lib/cucumber/formatter/legacy_api/runtime_facade.rb
mobiusloop-0.1.3 lib/cucumber/formatter/legacy_api/runtime_facade.rb
mobiusloop-0.1.2 lib/cucumber/formatter/legacy_api/runtime_facade.rb
cucumber-2.3.3 lib/cucumber/formatter/legacy_api/runtime_facade.rb
cucumber-2.3.2 lib/cucumber/formatter/legacy_api/runtime_facade.rb
cucumber-2.3.1 lib/cucumber/formatter/legacy_api/runtime_facade.rb
cucumber-2.3.0 lib/cucumber/formatter/legacy_api/runtime_facade.rb
cucumber-2.2.0 lib/cucumber/formatter/legacy_api/runtime_facade.rb