Sha256: 83d02ae7526a2d5187d620fd54080a93659204c585e555ed97758d4bb62289c1

Contents?: true

Size: 659 Bytes

Versions: 131

Compression:

Stored size: 659 Bytes

Contents

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

require 'gherkin'
require "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
    @listener = Gherkin::SexpRecorder.new
  end
end

World do 
  GherkinWorld.new
end

Version data entries

131 entries across 131 versions & 1 rubygems

Version Path
gherkin-1.0.30 features/support/env.rb
gherkin-1.0.30-i386-mswin32 features/support/env.rb
gherkin-1.0.30-i386-mingw32 features/support/env.rb
gherkin-1.0.30-universal-dotnet features/support/env.rb
gherkin-1.0.30-java features/support/env.rb
gherkin-1.0.29 features/support/env.rb
gherkin-1.0.29-i386-mswin32 features/support/env.rb
gherkin-1.0.29-i386-mingw32 features/support/env.rb
gherkin-1.0.29-java features/support/env.rb
gherkin-1.0.28 features/support/env.rb
gherkin-1.0.28-i386-mswin32 features/support/env.rb
gherkin-1.0.28-i386-mingw32 features/support/env.rb
gherkin-1.0.28-java features/support/env.rb
gherkin-1.0.27 features/support/env.rb
gherkin-1.0.27-i386-mswin32 features/support/env.rb
gherkin-1.0.27-i386-mingw32 features/support/env.rb
gherkin-1.0.27-java features/support/env.rb
gherkin-1.0.26 features/support/env.rb
gherkin-1.0.26-i386-mswin32 features/support/env.rb
gherkin-1.0.26-i386-mingw32 features/support/env.rb