Sha256: 42f05bcd07f7e2310f8f26b922e6a19f986ee288d35fb295b1f4d8fe6639b492

Contents?: true

Size: 702 Bytes

Versions: 30

Compression:

Stored size: 702 Bytes

Contents

# 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'

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

30 entries across 30 versions & 1 rubygems

Version Path
gherkin-2.1.5 features/support/env.rb
gherkin-2.1.5-i386-mswin32 features/support/env.rb
gherkin-2.1.5-i386-mingw32 features/support/env.rb
gherkin-2.1.5-universal-dotnet features/support/env.rb
gherkin-2.1.5-java features/support/env.rb
gherkin-2.1.4 features/support/env.rb
gherkin-2.1.4-i386-mswin32 features/support/env.rb
gherkin-2.1.4-i386-mingw32 features/support/env.rb
gherkin-2.1.4-universal-dotnet features/support/env.rb
gherkin-2.1.4-java features/support/env.rb
gherkin-2.1.3 features/support/env.rb
gherkin-2.1.3-i386-mswin32 features/support/env.rb
gherkin-2.1.3-i386-mingw32 features/support/env.rb
gherkin-2.1.3-universal-dotnet features/support/env.rb
gherkin-2.1.3-java features/support/env.rb
gherkin-2.1.2 features/support/env.rb
gherkin-2.1.2-i386-mswin32 features/support/env.rb
gherkin-2.1.2-i386-mingw32 features/support/env.rb
gherkin-2.1.2-universal-dotnet features/support/env.rb
gherkin-2.1.2-java features/support/env.rb