How To Test A Controller in Ruby On Rails
Too Long; Didn't Read
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.