Iteration C4: Functional Testing of Controllers
Now for the moment of truth. Before we focus on writing new tests, we need to determine if weâve broken anything. Remembering our experience after we added validation logic to our model, with some trepidation we run our tests again:
â | âdepot>ââ ââbin/railsââ ââtestâ |
This time, all is well. We added a lot, but we didnât break anything. Thatâs a relief, but our work isnât done yet; we still need tests for what we just added.
The unit testing of models that we did previously seemed straightforward enough. We called a method and compared what it returned against what we expected it to return. But now weâre dealing with a server that processes requests and a user ...
Get Agile Web Development with Rails 5, 1st Edition now with the O’Reilly learning platform.
O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.