Forum: RSpec Shared behaviors in Cucumber?

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.
3da512875f3295be2d577fa70b3493b4?d=identicon&s=25 Sebastian W. (globulus)
on 2009-03-07 00:03
Hello RSpec group, is there a way to do RSpec-style shared behaviors in
Cucumber? Or something similar?
Cdf378de2284d8acf137122e541caa28?d=identicon&s=25 Matt Wynne (mattwynne)
on 2009-03-07 00:33
(Received via mailing list)
You have Background in the new 0.2 version (not released yet) which
lets you specify some Given steps for all the scenarios in a feature.

Other than that there's the super-steps, which also give you really
nice re-use:
http://blog.mattwynne.net/2008/11/14/dry-up-your-c...


On 6 Mar 2009, at 23:03, Sebastian W. wrote:

> Hello RSpec group, is there a way to do RSpec-style shared behaviors
> in
> Cucumber? Or something similar?
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Matt Wynne
http://blog.mattwynne.net
http://www.songkick.com
C694a032be7518a0d704318895f8fe1d?d=identicon&s=25 Ben Mabey (mabes)
on 2009-03-07 00:56
(Received via mailing list)
Matt Wynne wrote:
> You have Background in the new 0.2 version (not released yet) which
> lets you specify some Given steps for all the scenarios in a feature.
>
> Other than that there's the super-steps, which also give you really
> nice re-use:
> http://blog.mattwynne.net/2008/11/14/dry-up-your-c...

Plus you can use Scenario Outlines to DRY up similar scenarios:
http://wiki.github.com/aslakhellesoy/cucumber/scen...

-Ben
Cdf378de2284d8acf137122e541caa28?d=identicon&s=25 Matt Wynne (mattwynne)
on 2009-03-07 02:42
(Received via mailing list)
On 6 Mar 2009, at 23:35, Ben Mabey wrote:

>
> -Ben


*slaps forehead* thanks Ben - I missed the big hitter!


Matt Wynne
http://blog.mattwynne.net
http://www.songkick.com
This topic is locked and can not be replied to.