John Polling wrote:
Already reading that one thanks :-) It is a good book and it's helping
me get my head around it all.  It's just a case of understanding when to
develop using Cucumber and when to user RSpec on it's own. I think this
will come with experience.

John

Others can explain it better than me (and have), but in a nutshell:

- use Cucumber for full stack (as the user would see it) testing. Some call it User Acceptance Testing (UAT) - use RSpec for unit/functional testing (controllers, models, views, helpers)

I think of it like this: RSpec is for the developer, Cucumber is for the user. That may be a gross oversimplification, but it works for me. :) But one thing to keep in mind is that you can (and maybe should) use them together. Through Cucumber, you establish the context of what the user will expect. Through RSpec, you establish expectations for the different pieces of the application. That's why it's called "Outside In Development": You start with the outside of the black box (what the user interacts with) and then step into the black box (the nuts and bolts that the user doesn't care about, but you, the developer, do).

Yes, it will come with experience. Just be patient, learn from your mistakes, and ask lots of questions! That you have testing knowledge already will help. Once the RSpec/Cucumber light goes on, there will be no stopping you!

Peace,
Phillip
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to