Understanding the many levels of testing
There are many levels at which you can test code in Ruby. The lowest level of testing is unit testing, where you are testing the smallest possible amount of code in your library, such as a single method in a single class, with all dependencies of the method mocked or stubbed. The highest level of testing is some form of acceptance testing, which can be automated or manual. In a web application, manual acceptance testing can be just using the development version of the application in a browser and trying different features. Automated acceptance testing of web applications tries to imitate this by running an actual browser and programmatically controlling it by telling it which links to click on and which buttons to press.
There are multiple levels in between. Model testing runs at a higher level than unit testing, testing individual methods of objects, but with none of the method's dependencies mocked or stubbed. Integration testing involves...