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