Sha256: 1031343524b3adb95b4214d82e44e2f129f9b858d9f26d5c21ebe1000714fab3

Contents?: true

Size: 470 Bytes

Versions: 2

Compression:

Stored size: 470 Bytes

Contents

require 'json'
module Cucumber
  class StepDefinitions
    def initialize(configuration = Configuration.default)
      configuration = Configuration.parse(configuration)
      @support_code = Runtime::SupportCode.new(nil, false)
      @support_code.load_files_from_paths(configuration.autoload_code_paths)
    end
    
    def to_json
      @support_code.step_definitions.map do |step_definition|
        step_definition.regexp_source
      end.to_json
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cucumber-0.9.2 lib/cucumber/step_definitions.rb
cucumber-0.9.1 lib/cucumber/step_definitions.rb