What Does The View Test Do?

Learn about view testing functionalities, and how to make the view test pass.

View testing performance

In the following added view test, first, we create the given: data. We use let to create the on-schedule project and task. The objects need to be in the database so that the Rails associations all work. But other choices might make the test faster, including creating projects and stubbing the on_schedule? method or using FactoryBot.build_stubbed to create real objects without saving them in the database.

Get hands-on with 1200+ tech skills courses.