[rspec-users] [Cucumber] call the (Treetop?) parser directly?

Phlip phlip2005 at gmail.com
Sat Apr 25 00:07:21 EDT 2009


The sample code:

require 'treetop'
require 'cucumber'
require 'cucumber/parser'
require 'cucumber/parser/treetop_ext'
   # too many requires because fishing around!

   include Cucumber
   include Parser
   include Feature

   @parser = FeatureParser.new
   exp = @parser.parse_or_fail(%{# My comment
Feature: hi

The error message:

NameError: undefined local variable or method `_nt_scenario_outline_keyword' for 
     cucumber (0.3.0) lib/cucumber/parser/feature.rb:855:in `_nt_scenario_outline'
     cucumber (0.3.0) lib/cucumber/parser/feature.rb:106:in `_nt_feature'
     cucumber (0.3.0) lib/cucumber/parser/feature.rb:102:in `loop'

Okay, how do I just whip out the parser and have it parse raw Cuke code?


More information about the rspec-users mailing list