Verifying select field value with Cucumber and Webrat
May.31, 2009 in
programming
I’ve been using Cucumber and Webrat for only a couple months now. Today I needed something new and it wasn’t obvious how to make it work.
Here’s an example of a test in Cucumber:
Given I am Sam
When I follow “Foo”
Then the “Bar” field should contain “Baz”
Which relies on Webrat:
Then /^the “([^"]*)” field should contain “([^"]*)”$/ do [...]
