Tests can be slow. This is how to find out why they’re slow.
Toss this bad boy into spec/support/profile.rb and tag any example with :profile => true and it’ll spit out callgrind dumps for your consumption in KCachegrind or similar.
If you specify PROFILE=all on your command line, it’ll profile *all* examples, regardless of tagging. If you pass PROFILE=true (or any other non-nil, non-ALL value) then it’ll profile tagged examples.
Bam.