Sha256: 31a371c74822b635d0f59c908f386bf4f70a67eedfc507274975a495ed3053d3

Contents?: true

Size: 805 Bytes

Versions: 9

Compression:

Stored size: 805 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'
require 'gherkin/json'

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

9 entries across 9 versions & 2 rubygems

Version Path
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/gherkin-2.2.9/features/support/env.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/gherkin-2.2.9/features/support/env.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/gherkin-2.2.9/features/support/env.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/gherkin-2.2.9/features/support/env.rb
gherkin-2.2.9 features/support/env.rb
gherkin-2.2.9-x86-mswin32 features/support/env.rb
gherkin-2.2.9-x86-mingw32 features/support/env.rb
gherkin-2.2.9-universal-dotnet features/support/env.rb
gherkin-2.2.9-java features/support/env.rb