For several months, I have been writing test-case ahead of any implementation. But the joy multiplied when we started thinking BDD. To me using RSpec as BDD tool is not much different than Rails default test mechanism other than the representation, unless you try the Story.
Test first development has a big advantage that you consider all possible scenarios before writing code. Yet sometimes you may miss some lines covered. An wonderful gem you require to check test coverage in Ruby is rcov. And no wonder RSpec has built-in support for rcov :) To test you code coverage, run
This will create a folder named "coverage" on your rails root. Open the index.html from that folder in your browser to see how much your code is covered by test case. The screenshot is a polling script I just started.