Forum: RSpec [cucumber] Multi-line Step Arguments

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A41972066cb507303d79ef4c4da072b5?d=identicon&s=25 keith shaw (Guest)
on 2009-05-07 22:29
(Received via mailing list)
Hey All,

I am trying to set up cucumber to use the multiline step argument.  I
have
my test posted here : http://gist.github.com/108328.  I am currently
using
cucumber version 0.2.3.  When I run the test the browser opens for a
split
second and I receive the following error :

/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/parser/treetop_ext.rb:42:in
`parse_or_fail': test/podPackage.feature:13:3: Parse error, expected one
of
"\n", "\r", "\"\"\"", "#", "Given", "When", "Then", "And", "But", "@",
"Scenario", "Scenario Outline". (Cucumber::Parser::SyntaxError)
    from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/parser/treetop_ext.rb:28:in
`parse_file'
    from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/parser/treetop_ext.rb:33:in
`open'
    from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/parser/treetop_ext.rb:33:in
`parse_file'
    from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:55:in
`load_plain_text_features'
    from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:54:in
`each'
    from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:54:in
`load_plain_text_features'
    from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:37:in
`execute!'
    from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:20:in
`execute'
    from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6
    from /usr/bin/cucumber:19:in `load'
    from /usr/bin/cucumber:19

Do I have my test set up correctly?  Any help is greatly appreciated.

Thanks,

Keith
Cdf378de2284d8acf137122e541caa28?d=identicon&s=25 Matt Wynne (mattwynne)
on 2009-05-07 22:42
(Received via mailing list)
On 7 May 2009, at 21:28, keith shaw wrote:

> Hey All,
>
> I am trying to set up cucumber to use the multiline step argument.
> I have my test posted here : http://gist.github.com/108328.

You need to use 'Scenario Outline', not 'Scenario' if you're using an
Examples table. I think that's the problem.

> cucumber/parser/treetop_ext.rb:28:in `parse_file'
>     from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/
>
> Keith
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Matt Wynne
http://beta.songkick.com
http://blog.mattwynne.net
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-05-07 23:02
(Received via mailing list)
>
That's correct. If you upgrade Cucumber to the latest version (0.3.2)
you'll
also have to change:

"Binding Type Radio Button"
to
"Binding Type Radio button"

This is because of a recent bug:
https://rspec.lighthouseapp.com/projects/16211-cuc...
Hopefully that will be fixed in 0.3.3.

Aslak
A41972066cb507303d79ef4c4da072b5?d=identicon&s=25 keith shaw (Guest)
on 2009-05-07 23:11
(Received via mailing list)
That did the trick!

Thank You!
This topic is locked and can not be replied to.