kirk bushell | Riding the wave of programmatic novelty

Archive for tag Unit

Testing using RSpec, Part 2 - the Controller

When first learning how to write tests for rails applications (or anything for that matter), using RSpec, probably my biggest stumbling block, was mocking and testing my controllers. There was just so much to take in it was hard to make sense of it all. But, little by little I made progress. In this article I'll go over writing some basic tests for your controller and offer some of the methods you can use to write your tests.

Testing using RSpec, Part 1 - Models

This is part of a 4-part series which will go over the various tests you can write for your models, controllers, views and acceptance using RSpec. My first article will begin with our application models and testing with and without database connectivity.