[rspec-users] ????? lots of Q's about integration tests with rspec
lists at ruby-forum.com
Mon Oct 20 12:49:11 EDT 2008
where should I put the integration tests when using rspec?
There is an integration-folder in test-directory, but if I place tests
here then how can I benefit from the fixtures-dir in spec-folder? I want
to stay in the spec-folder, right? I do not want to maintain two
fixtures. I'm not sure how important it is to stick with the
default-folders that come with rspec and rails. What if I need those
According to rspec's documentation they recommend that I stub out the
model when testing controller. For me there is not much value from
testing controllers this way. Controller-code is small, it is often
mostly workflow-code. Also, I thought that part of the whole method of
BDD was to begin with full-integration tests at the outermost level and
that I then perhaps could work my way in to the model with unit tests. I
cannot understand why I should stub out model in controller-tests and
call db in model-tests. Shouldn't it be the other way round? Drill
through the whole cake from controller-tsts and stub everything else out
from model-tests ?
I would rather delete spec/controller and have something like spec/full
or maybe spec/requirements. That would give me my full-integration tests
and the controller-tests. Are there any problems with this strategy?
Thanks for advice!
Posted via http://www.ruby-forum.com/.
More information about the rspec-users