[rspec-users] Sharing the little dialects we write in Cucumber
matt at mattwynne.net
Sat Nov 8 05:01:48 EST 2008
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  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
Given there is a User
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?
More information about the rspec-users