TL;DR —
How To Test A Controller in Ruby On Ruby On Rails is part of the first section of this article. We'll discuss a little bit philosophy of testing but more writing tests. The first test I am going to write is a controller test. The job of the index action here is to load the post using the model and then saving it as instance variable and returning some kind of response. The simplest test we can write is to test the response. In this case I have a post controller test which is generated when i generated the controller.
[story continues]
Written by
@arslanbisharat
Full-Stack Software Developer
Topics and
tags
tags
backend|testing|mvc|mvc-basics|code-quality|software-development|qa|software-testing
This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: DtEhj6quDBsk0tK12TKNBT51imgoUfHpucKdd2Laejc
