Sha256: 46bbdad54600e4cc7ee0e19e0bc18098586378a75e121ef823efafcc2c2f30ab

Contents?: true

Size: 831 Bytes

Versions: 23

Compression:

Stored size: 831 Bytes

Contents

if RUBY_VERSION =~ /1.9/
  Encoding.default_external = Encoding::UTF_8
  Encoding.default_internal = Encoding::UTF_8
end

require 'rubygems'
require 'bundler'
Bundler.setup

# I'm sure there's a better way than this...
%w{ /../../spec /../../lib}.each do |path|
  $LOAD_PATH << File.expand_path(File.dirname(__FILE__) + path)
end
require 'gherkin'
require 'gherkin/sexp_recorder'

module TransformHelpers
  def tr_line_number(step_arg)
    /(\d+)$/.match(step_arg)[0].to_i
  end

  def tr_line_numbers(step_arg)
    if step_arg =~ /through/
      Range.new(*step_arg.scan(/\d+/).collect { |i| i.to_i })
    else
      step_arg.scan(/\d+/).collect { |i| i.to_i }
    end
  end
end

class GherkinWorld
  include TransformHelpers

  def initialize
    @formatter = Gherkin::SexpRecorder.new
  end
end

World do
  GherkinWorld.new
end

Version data entries

23 entries across 21 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/gherkin-2.12.2/features/support/env.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/gherkin-2.12.2/features/support/env.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/gherkin-2.12.2/features/support/env.rb
gherkin-2.12.2 features/support/env.rb
gherkin-2.12.2-x86-mswin32 features/support/env.rb
gherkin-2.12.2-x86-mingw32 features/support/env.rb
gherkin-2.12.2-java features/support/env.rb
gherkin-2.12.1 features/support/env.rb
gherkin-2.12.1-x86-mswin32 features/support/env.rb
gherkin-2.12.1-x86-mingw32 features/support/env.rb
gherkin-2.12.1-java features/support/env.rb
gherkin-2.12.0 features/support/env.rb
gherkin-2.12.0-x86-mingw32 features/support/env.rb
gherkin-2.12.0-x86-mswin32 features/support/env.rb
gherkin-2.12.0-java features/support/env.rb
gherkin-2.11.8 features/support/env.rb
gherkin-2.11.8-x86-mswin32 features/support/env.rb
gherkin-2.11.8-x86-mingw32 features/support/env.rb
gherkin-2.11.8-java features/support/env.rb
gherkin-2.11.7 features/support/env.rb