Sha256: ff6932b73f85d63cfb34d1b4efc22dcf563f8ca3b210ebc5128c80ce8286d196

Contents?: true

Size: 782 Bytes

Versions: 89

Compression:

Stored size: 782 Bytes

Contents

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'
require 'gherkin/output_stream_string_io'
require 'gherkin/java_libs'

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

89 entries across 89 versions & 3 rubygems

Version Path
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/gherkin-2.3.3/features/support/env.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/gherkin-2.3.3/features/support/env.rb
gherkin-2.4.6 features/support/env.rb
gherkin-2.4.6-x86-mswin32 features/support/env.rb
gherkin-2.4.6-x86-mingw32 features/support/env.rb
gherkin-2.4.6-universal-dotnet features/support/env.rb
gherkin-2.4.6-java features/support/env.rb
gherkin-2.4.5 features/support/env.rb
gherkin-2.4.5-x86-mswin32 features/support/env.rb
gherkin-2.4.5-x86-mingw32 features/support/env.rb
gherkin-2.4.5-universal-dotnet features/support/env.rb
gherkin-2.4.5-java features/support/env.rb
gherkin-2.4.4-x86-mswin32 features/support/env.rb
gherkin-2.4.4-x86-mingw32 features/support/env.rb
gherkin-2.4.4-universal-dotnet features/support/env.rb
gherkin-2.4.4-java features/support/env.rb
gherkin-2.4.3 features/support/env.rb
gherkin-2.4.3-x86-mswin32 features/support/env.rb
gherkin-2.4.3-x86-mingw32 features/support/env.rb
gherkin-2.4.3-universal-dotnet features/support/env.rb