Yesterday I posted about CruiseControl for Rails projects. It was working fine with all my rails projects using traditional test cases, But today I faced a problem with a project using RSpec. Actually, By default CruiseControl follows the following step to build:

  1. rake db:test:purge
  2. rake db:migrate
  3. rake test

This default was not working with my last project As I was using RSpec for my project. I found that we can overwrite default way of building by creating a rake task named cruise in our project. Means by building CruiseControl will run your custom rake task only, so you have to take care of all other things i.e. migrate etc.

Hence I created following rake task in RAILS_ROOT/lib/tasks/custom_cc.rake

and it worked for my rails project using RSpec.

Share this: