kirk bushell | Riding the wave of programmatic novelty

Archive for tag Rspec

An Rspec Model Example

Both in part due to the traffic coming to my blog via the subject line, and also my want to learn a bit more about RSpec model tests, I thought maybe it would be a good idea to throw together a more complicated model test, using RSpec. In this article, we'll look at the various methods you might have as part of... let's say... a vehicle model.

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.