Who Controls the Controllers?
Learn about controllers, controller testing, duplication controller test, business logic and controllers test, and who controls the controllers.
All of the new tests pass, so let’s take stock of what we have so far. We still have one test pending: our end-to-end test still doesn’t like that the create
action can’t be found in the ProjectsController
. Now we have all the pieces we need to write that action.
Controller testing as low value
The next question is, are we going to write any tests specifically to target the controller’s logic? The answer, perhaps surprisingly, is no. Or at least not with the tools already discussed.
Controller tests, which have been a feature of Rails initially, have increasingly been seen as lower-value tests in a couple of different ways. ...