[rspec-users] rake 0.9.0 activated error + debugger not working?

David Chelimsky dchelimsky at gmail.com
Tue Jun 7 06:43:21 EDT 2011


On Jun 7, 2011, at 4:21 AM, Patrick J. Collins wrote:

>> Rake is a tool for running tasks of any nature, which you can invoke with the command `rake`. If you run `rake -T` in your project, you'll see that `rake spec` is just one of many other tasks you can run that do all kinds of things, not just to do with running tests.
>> 
>> RSpec is a tool for running BDD-style unit tests, which you can invoke with the command `rspec`. If you run `rspec --help` you'll see all the options you could pass to the rspec command.
> Right..  I just was wondering if the entire process of invoking RSpec to run
> all tests is identical between 'rake spec' and 'spec rspec'
> 
> Which I am assuming by your answer that it is.  Rake spec runs a task that
> probably just does: 'spec rspec'  ?

While that is the end result, they are still quite different. The 'rake' task loads resources it needs for all rake tasks, and then it shells out to a separate process. In a Rails app, the rake task starts in the development environment (as that is the default) and shells out to the test environment. This means that you take the hit of loading up the Rails environment twice when you run 'rake spec', whereas 'rspec spec' loads it once, and doesn't load up the other things you need for other rake tasks.

HTH,
David


More information about the rspec-users mailing list