RSpec-2.0.0 is released
blog.davidchelimsky.net
blog.davidchelimsky.net
Tests as documentation are really coming around.
Sincerely, A cucumber convert
(ps: For those not familiar with cucumber, it provides a DSL to describe application behavior in plain-text, which is then translated into runnable tests. http://cukes.info/)
So wasteful.
That said, I haven't worked extensively with Cucumber and would love to hear opinions to the contrary. Hard to tell if it's a Ruby fad or a genuine improvement in workflow.
For us, the mere excercise of writing the stories with customers has been very useful in getting the requirements out of their heads. We can then say "You helped us write these, the app does what you said you wanted it to" and there are less issues with communication.
It's saved us time and money. Here's just an example of how we use it, using EmailSpec.
Given I'm logged in to the central authentication service as "bphogan"
And I am on the home page
Then I should see "Welcome, Brian"
When I select "Administrative Information"
And I follow "Change Address"
Then I should see "Fill in this form to change your address"
When I fill in "Address 1" with "123 Fake Stree"
And I fill in "City" with "Springfield"
And I select "OR" from "States"
And I fill in "12345" for "Postal Code"
And I press "Change Address"
Then I should see "Your address has been updated"
And I should receive an email
When I open the email
Then I should see "We have updated your address"
That alone tells a client so much about what we're doing, and tells the developers what real tasks need to be extracted from the story to make it all pass. Things like "select" and "fill in" are already done for you. There are only two custom tasks in this scenario, and we wrote those once and share them across projects.See http://elabs.se/blog/15-you-re-cuking-it-wrong and http://mislav.uniqpath.com/2010/09/cuking-it-right/
I take it that EmailSpec generates the other half of the implementation for you?
EmailSpec gives me step definitions for dealing with opening emails in a "virtual" email box. Very handy stuff.