Making the Capybara Test Pass
Learn about integration testing with capybara, controller method, how to make design decisions, and how to make the test pass.
Integration testing with Capybara
Let’s go through the integration-test process.
Note: We’re using factory_bot (see Adding Data to Tests) to create the projects and tasks with
let!
. We could also use fixtures, but we’ve decided the factories are more readable if slower for this go-around.
The first failure is that we don’t have a show method in the ProjectsController
. The show
method is easy enough and probably doesn’t need additional testing:
Get hands-on with 1200+ tech skills courses.