Why write tests for Rails apps?  

Unit tests are your friend. The sooner you make peace with the fact that your quality of life will drastically increase when you unit test your code, the better. Seriously.

This excerpt was taken from the official Rails documentation.

Remember, unit tests should be FIRST – fast, isolated, repeatable, self-verifying, and timely.

 
3
Kudos
 
3
Kudos

Now read this

Naming Variables

Russ Cox writes: A name’s length should not exceed its information content. For a local variable, the name i conveys as much information as index or idx and is quicker to read. Similarly, i and j are a better pair of names for index... Continue →