Sha256: d287eabbff8a643f1ef93f52b87cd4ede4e70dc6bc29345ceb6bef97d919dac1

Contents?: true

Size: 923 Bytes

Versions: 18

Compression:

Stored size: 923 Bytes

Contents

Given /^a "([^\"]*)", "([^\"]*)" "([^\"]*)" parser$/ do |i18n_language, impl, parser_name|
  parser = Gherkin::Parser.new(@listener, false, parser_name)
  programming_language = {
    'ruby' => 'rb',
    'native' => (defined?(JRUBY_VERSION) ? 'java' : 'c')
  }[impl]
  @lexer = Gherkin::Lexer.send(programming_language)[i18n_language].new(parser)
end

Given "the following text is parsed:" do |text|
  @lexer.scan(text)
end

Then "there should be no parse errors" do
  @listener.errors.should == []
end

Then /^there should be a parse error on (line \d+)$/ do |line|
  @listener.line(line).should include(:syntax_error, line)
end

Then /^there should be parse errors on (lines .*)$/ do |lines|
  lines.each do |line|
    Then "there should be a parse error on line #{line}"
  end
end

Transform /^line \d+$/ do |step_arg|
  tr_line_number(step_arg)
end

Transform /^lines .*$/ do |step_arg|
  tr_line_numbers(step_arg)
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
gherkin-1.0.2-i386-mswin32 features/step_definitions/gherkin_steps.rb
gherkin-1.0.2-i386-mingw32 features/step_definitions/gherkin_steps.rb
gherkin-1.0.2-java features/step_definitions/gherkin_steps.rb
gherkin-1.0.2 features/step_definitions/gherkin_steps.rb
gherkin-1.0.1-i386-mswin32 features/step_definitions/gherkin_steps.rb
gherkin-1.0.1-i386-mingw32 features/step_definitions/gherkin_steps.rb
gherkin-1.0.1-universal-java-1.5 features/step_definitions/gherkin_steps.rb
gherkin-1.0.1 features/step_definitions/gherkin_steps.rb
gherkin-1.0.0-i386-mingw32 features/step_definitions/gherkin_steps.rb
gherkin-1.0.0-i386-mswin32 features/step_definitions/gherkin_steps.rb
gherkin-1.0.0-universal-java-1.5 features/step_definitions/gherkin_steps.rb
gherkin-1.0.0 features/step_definitions/gherkin_steps.rb
gherkin-0.0.4-universal-java-1.5 features/step_definitions/gherkin_steps.rb
gherkin-0.0.4-i386-mswin32 features/step_definitions/gherkin_steps.rb
gherkin-0.0.4-i386-mingw32 features/step_definitions/gherkin_steps.rb
gherkin-0.0.4 features/step_definitions/gherkin_steps.rb
gherkin-0.0.3-universal-java-1.5 features/step_definitions/gherkin_steps.rb
gherkin-0.0.3 features/step_definitions/gherkin_steps.rb