Run your specs in logical groups

I stumbled upon this StackOverflow question: testing – Organizing rspec 2 tests into ‘unit’ and ‘integration’ categories in rails – Stack Overflow.

Basically, the guy asks how he can run specs isolated into logical groups, running the unit without running the integration and so on.

At Gogobot, we have exactly that, since we run our specs in the CI, we can decide which to run, and they run one after the other and dependent on each other, so if you fail UNIT, the build fails, no need to continue on.

You can run the rakes like so

 

This is what our spec.rake looks like

 

Submit to Hacker News

[NOTE] This post has been imported to Hugo from a Wordpress blog. It may be broken, missing images, code snippets or other information.

[NOTE] updated April 5, 2012. It's 2345 days old . This article may have outdated content.