0

I have doubt about my understanding of TDD concept in RoR. This is how I get it:

  1. 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.

alex
  • 3,682
  • 3
  • 21
  • 22

1 Answers1

0

This may help you with it. You fill find a lot of useful links here about TDD and RoR. I hope it is what you are looking for.

Community
  • 1
  • 1
dexametason
  • 1,133
  • 7
  • 16