Tagging examples in scenario outlines

26 views
Skip to first unread message

Andy Waite

unread,
Sep 16, 2011, 4:35:58 PM9/16/11
to Cukes
I was reading this old post about tagging example groups:


http://groups.google.com/group/cukes/browse_thread/thread/6613b707b52c4afd/3e9a5e5ee3c71497?lnk=gst&q=scenario+outline+tags#3e9a5e5ee3c71497

and I created this feature;

http://pastie.org/pastes/2544812/text

But when I run it with the -t option, it fails with the error below.

I found a page which suggest it may be connected to a bug with running
empty scenario outlines:

http://qastuffs.blogspot.com/2011/07/cucumber-undefined-method-line-for.html

$ bundle exec cucumber features/example.feature -t ~@failing --dry-run
Using the default profile...
undefined method `line' for nil:NilClass (NoMethodError)
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.3.5/lib/gherkin/
formatter/filter_formatter.rb:64:in `examples'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.3.5/lib/gherkin/
formatter/tag_count_formatter.rb:30:in `examples'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.3.5/lib/gherkin/
listener/formatter_listener.rb:107:in `replay_step_or_examples'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.3.5/lib/gherkin/
listener/formatter_listener.rb:65:in `eof'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.3.5/lib/gherkin/
parser/parser.rb:46:in `method_missing'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.3.5/lib/gherkin/
lexer/i18n_lexer.rb:23:in `scan'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.3.5/lib/gherkin/
lexer/i18n_lexer.rb:23:in `scan'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/gherkin-2.3.5/lib/gherkin/
parser/parser.rb:31:in `parse'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-0.10.2/lib/
cucumber/feature_file.rb:37:in `parse'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-0.10.2/lib/
cucumber/runtime/features_loader.rb:28:in `block in load'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-0.10.2/lib/
cucumber/runtime/features_loader.rb:26:in `each'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-0.10.2/lib/
cucumber/runtime/features_loader.rb:26:in `load'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-0.10.2/lib/
cucumber/runtime/features_loader.rb:14:in `features'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-0.10.2/lib/
cucumber/runtime.rb:132:in `features'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-0.10.2/lib/
cucumber/runtime.rb:45:in `run!'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-0.10.2/lib/
cucumber/cli/main.rb:43:in `execute!'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-0.10.2/lib/
cucumber/cli/main.rb:20:in `execute'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-0.10.2/bin/
cucumber:14:in `<top (required)>'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/bin/cucumber:19:in `load'
/Users/andy/.rvm/gems/ruby-1.9.2-p290/bin/cucumber:19:in `<main>'

aslak hellesoy

unread,
Sep 16, 2011, 5:06:32 PM9/16/11
to cu...@googlegroups.com
On Fri, Sep 16, 2011 at 9:35 PM, Andy Waite <andy...@gmail.com> wrote:
I was reading this old post about tagging example groups:


http://groups.google.com/group/cukes/browse_thread/thread/6613b707b52c4afd/3e9a5e5ee3c71497?lnk=gst&q=scenario+outline+tags#3e9a5e5ee3c71497

and I created this feature;

 http://pastie.org/pastes/2544812/text

But when I run it with the -t option, it fails with the error below.

I found a page which suggest it may be connected to a bug with running
empty scenario outlines:

 http://qastuffs.blogspot.com/2011/07/cucumber-undefined-method-line-for.html


I'm working on a fix.

Aslak
 

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.


aslak hellesoy

unread,
Sep 16, 2011, 6:48:57 PM9/16/11
to cu...@googlegroups.com
On Fri, Sep 16, 2011 at 10:06 PM, aslak hellesoy <aslak.h...@gmail.com> wrote:


On Fri, Sep 16, 2011 at 9:35 PM, Andy Waite <andy...@gmail.com> wrote:
I was reading this old post about tagging example groups:


http://groups.google.com/group/cukes/browse_thread/thread/6613b707b52c4afd/3e9a5e5ee3c71497?lnk=gst&q=scenario+outline+tags#3e9a5e5ee3c71497

and I created this feature;

 http://pastie.org/pastes/2544812/text

But when I run it with the -t option, it fails with the error below.

I found a page which suggest it may be connected to a bug with running
empty scenario outlines:

 http://qastuffs.blogspot.com/2011/07/cucumber-undefined-method-line-for.html


I'm working on a fix.


Done. Upgrade to gherkin 2.4.20.

Aslak

Andy Waite

unread,
Sep 16, 2011, 7:23:55 PM9/16/11
to Cukes
> Done. Upgrade to gherkin 2.4.20.
>
> Aslak

That seems to work, thanks!

Andy
Reply all
Reply to author
Forward
0 new messages