Comments on: what exactly does rake spec do? /2011/05/what-exactly-does-rake-spec-do/ Sarah Allen's reflections on internet software and other topics Sun, 08 May 2011 23:15:57 +0000 hourly 1 https://wordpress.org/?v=5.7.1 By: Mark Wilden /2011/05/what-exactly-does-rake-spec-do/#comment-747 Sun, 08 May 2011 23:15:57 +0000 /?p=3164#comment-747 I include Rake.application.options.trace = true in my Rakefiles so that I always see not only the tasks that are executed, but also the backtrace when there’s an error (why would anyone not want to see this??).

And yes, tracing rake spec like this shows some interesting things – in particular, why the task is so slow. That’s why most of the time, I run a command like

bundle exec rspec -b spec/models/model_spec.rb:204

-b is for backtrace, and, again, I have to wonder why this is not the default? When you get a runtime error, why would you ever not want to see what caused it?

]]>