ParseError when Feature file contains docstring

82 views
Skip to first unread message

Mieczysław Daniel Dyba

unread,
May 16, 2013, 12:13:37 AM5/16/13
to spina...@googlegroups.com
Hello,

I ran into this error when I wrote a feature file that included docstrings:

$ bin/rake spinach
/Users/danieldyba/.rbenv/versions/1.9.3-p327/bin/ruby -S spinach
/Users/danieldyba/.rbenv/versions/1.9.3-p327/lib/ruby/1.9.1/racc/parser.rb:351:in `on_error':  (Racc::ParseError)
parse error on value "\"\"\"" (TEXT)
from (eval):3:in `_racc_do_parse_c'
from (eval):3:in `do_parse'
from /Users/danieldyba/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/gherkin-ruby-0.3.0/lib/gherkin_ruby/parser/lexer.rb:31:in `scan_str'
from gherkin.y:107:in `parse'
from /Users/danieldyba/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/gherkin-ruby-0.3.0/lib/gherkin_ruby.rb:8:in `parse'
from /Users/danieldyba/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/spinach-0.8.2/lib/spinach/parser.rb:39:in `parse'
from /Users/danieldyba/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/spinach-0.8.2/lib/spinach/runner.rb:75:in `block in run'
from /Users/danieldyba/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/spinach-0.8.2/lib/spinach/runner.rb:72:in `each'
from /Users/danieldyba/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/spinach-0.8.2/lib/spinach/runner.rb:72:in `run'
from /Users/danieldyba/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/spinach-0.8.2/lib/spinach/cli.rb:27:in `run'
from /Users/danieldyba/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/spinach-0.8.2/bin/spinach:15:in `<top (required)>'
from /Users/danieldyba/.rbenv/versions/1.9.3-p327/bin/spinach:23:in `load'
from /Users/danieldyba/.rbenv/versions/1.9.3-p327/bin/spinach:23:in `<main>'
rake aborted!
Command failed with status (1): [/Users/danieldyba/.rbenv/versions/1.9.3-p3...]

Tasks: TOP => spinach
(See full trace by running task with --trace)

Here is sample code that triggered this error:

Feature: Display titles on static pages

  Scenario: Visiting the home page
    When I visit the home page
    Then the page should have the title:
      """
      Ruby on Rails Tutorial
      """

  Scenario: Visiting the about page
    When I visit the about page
    Then the page should have the title:
      """
      Ruby on Rails Tutorial | About
      """
  
  Scenario: Visiting the help page
    When I visit the help page
    Then the page should have the title:
      """
      Ruby on Rails Tutorial | Help
      """

Has anyone encountered this error before? I feel like I'm missing something simple here.

Mieczysław Daniel Dyba

unread,
May 16, 2013, 12:17:52 AM5/16/13
to spina...@googlegroups.com
It looks like Spinach runs on gherkin-ruby, which doesn't support docstrings:


Bummer.
Reply all
Reply to author
Forward
0 new messages