paint-brush
How To Test A Controller in Ruby On Railsby@arslanbisharat
128 reads

How To Test A Controller in Ruby On Rails

by Arslan Bisharat1mAugust 17th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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.
featured image - How To Test A Controller in Ruby On Rails
Arslan Bisharat HackerNoon profile picture
Arslan Bisharat

Arslan Bisharat

@arslanbisharat

Full-Stack Software Developer

Learn More
LEARN MORE ABOUT @ARSLANBISHARAT'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Arslan Bisharat HackerNoon profile picture
Arslan Bisharat@arslanbisharat
Full-Stack Software Developer

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Coffee-web
Learnrepo