[rspec-users] Cucumber step or model spec?
Marcelo de Moraes Serpa
celoserpa at gmail.com
Tue Jul 21 11:56:37 EDT 2009
Thank you all for the replies!
>I use Cucumber for specifying application behaviour and RSpec for
>specifying lower level component behaviour. In the scenario you
>* the application's job is to show only the active products
>* the view's job is to display any products it is given by the controller
>* the controller's job is to ask the model for the active products
>* the model's job is to supply only the active products
This was the most useful piece of information I've seen lately. I
think I was still not thinking with this behaviour mindset, and asking
this question -- "what is the responsibility/job of the controller in
this context" really helped me to find out that the controller's job
is to ask the model for the data, and this is exactly what I need to
spec -- if he is sending the right message and setting the right
By the way, great work on the rspec book, it has been really helping
me to master the art of BDD, along with your tireless support here in
the mailing list. Thanks a lot for the support!
On Mon, Jul 20, 2009 at 9:54 PM, Jonathan
Linowes<jonathan at parkerhill.com> wrote:
> On Jul 20, 2009, at 6:58 PM, David Chelimsky wrote:
>> So for me this is not an either/or question. Each underlying component
>> has a responsibility, and the result of the three components doing the
>> right thing adds up to the application behaving correctly.
> I'd also add that, for me, the cucumber story tends to exercise the more
> "typical" cases whereas my specs are more thorough in covering edge cases
> and exceptions.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users