upping your test coverage: rspec 1.1 + test unit

Posted by jacqui maher on December 18, 2007 at 10:50 AM

I am going to be looking into RSpec 1.1 in the next couple of days. While we haven’t upgraded our application to run on Rails 2 yet, I am really interested in RSpec’s new integration with Test::Unit.

Right now, we have two rake tasks for ascertaining test coverage using rcov: rake spec:rcov and rake test:rcov. Since one runs our Test::Unit tests, and one runs our RSpec tests, the outcome is far from accurate.

My plan is to hopefully use RSpec’s new integration with Test::Unit to convert all our Test::Unit tests to RSpec - this was, after all, my Big Plan from the beginning. It’s just a lot of work and I dont have that much time. I think this will allow me to move them all into the spec directory and get the total test coverage much more accurately.

I’ll be posting my progress here.

In other news, I’m almost done with the initial version of my automated mock framework plugin - nelson. More on that later as well.