[rspec-users] Cucumber step definitions vs. RSpec examples

Brandon Olivares programmer2188 at gmail.com
Sat Mar 28 09:49:46 EDT 2009


So, I'm confused. I've been trying to use Cucumber and RSpec, but step
definitions and RSpec examples just seem to be overlapping. What should go
in either one of these?

For instance, let's say I'm testing if a form exists on a page. What goes in
Cucumber and what goes in RSpec?

What I did for now is put Webrat methods in the step definitions, like
fill_in, select, etc, without submitting since I'm not testing processing
yet; and then put selector matchers in the RSpec examples.

But I have no idea if that's right. How do you separate these and keep them
from duplicating one another?


More information about the rspec-users mailing list