[rspec-users] webrat the way to go?
Willem van den Ende
willem at willemvandenende.com
Sun Sep 28 16:24:01 EDT 2008
I just started playing with cucumber
On Wed, 2008-09-17 at 22:44 +0200, aslak hellesoy wrote:
> If you already know RSpec I think you'd pick it up faster. Cucumber
> has some documentation that might be helpful:
Definitely helpful - after following the steps here It runs (mostly, see below).
> Hopefully the generators should be helpful for newbies.
They clearly are to me. I created a new feature (for a new model "Invitation) and a rspec_scaffold as indicated on the page.
With the generated Feature it is easy to see the differences with Rspec story runner and the way webrat should work.
It took me a bit to figure out that the generated code assumes the Model has a :name field (my Invitation has a Subject that mostly identifies it).
After fixing that, I get to 10 steps passed, 1 failed (and 6 skipped). Now I am stuck, because I do not understand the failure webrat seems to give-
When I go to invitation/new, I see the Subject field, but WebRat doesn't... :
Feature: Manage invitations
In order to keep track of invitations
A invitation mechanic
Should be able to manage several invitations
Scenario: Register new invitation
Given I am on the new invitation page
When I fill in "Subject" with "My invitation subject"
Could not find [Webrat::TextField, Webrat::TextareaField, Webrat::PasswordField]: "Subject" (RuntimeError)
./features/steps/common_webrat.rb:13:in `When /^I fill in "(.*)" with "(.*)"$/'
features/manage_invitations.feature:8:in `When I fill in "Subject" with "My invitation subject"'
I also installed the gems as indicated. "Subject" is a TextField, and I can see it... I would greatly appreciate any help...
Willem van den Ende
Living Software B.V.
www.livingsoftware.nl | www.experienceagile.eu | blog: me.andering.com
+31 6 413 06 965 | Spilmanstraat 25 | 5645 JE Eindhoven
More information about the rspec-users