[rspec-users] Sharing the little dialects we write in Cucumber

aslak hellesoy aslak.hellesoy at gmail.com
Sat Nov 8 06:22:53 EST 2008

On Sat, Nov 8, 2008 at 11:01 AM, Matt Wynne <matt at mattwynne.net> wrote:
> The common_webrat.rb steps file that comes with cucumber when you add it to
> rails really inspired our team.
> We've extended it a fair bit to do various other things to check the content
> of a page such as [1] which enable us to write steps like this:
>        Then I should see the text "dave" within the "friends" list
> We also have a bunch of generic steps that work with the factory_girl plugin
> to allow us easily create / manipulate different domain objects like this:
>        Given there is a User
> or
>        Given there are 3 Concerts
> Also, I've started writing some specs for a command-line tool, and will have
> a few steps that work with the command-line
>        When I issue the command "ls"
> I feel like I want to share this stuff and collaborate on it in a broader
> group outside our team but I'm not sure what would be the appropriate route.
> Obviously this stuff is pretty easy to re-use - you just have to require a
> ruby file that defines the steps so it's not like cucumber needs a plug-in
> manager exactly...
> What do people think? Is this stuff so trivially easy to other people that
> they prefer just to write it from scratch? Or are you also writing step
> matchers that you think other people could be using? How do you think we
> could best share them and collaborate on them?

I think some basic steps for output validation is good. I like the
essence in yours. Please add it in your fork.

> cheers,
> Matt
> [1]http://gist.github.com/23044
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list