I have doubt about my understanding of TDD concept in RoR. This is how I get it:
- Module tests have to be done with rspec:
1.1. Controllers - checking:
a) correctness of variables assigns
b) correctness of response
Should we call here the Model's methods (stubs)?
1.2. Models - checking:
a) precense of ActiveRecord's method calling when we call model's method
b) correctness of model's methods calculations
1.3. Views - checking:
a) precense of some information on the page?
Should I make these tests if I'll make cucumber+capybara integration tests?
1.4. Requests - checking:
a) precense of DOM elements?
Should I make these tests if I'll make cucumber+capybara integration tests?
1.5. Routing - checking:
a) precense and correctness of routes
2. Integration\acceptance tests have to be done with cucumber+capybara.
It may cross with rspec tests.
Should we call rpec's tests (according to DRY principle) in that case? And how?
Give me the feedback please.