I have followed this tutorial on speeding up rspec with spork, and I am on a win7 x64 box with ruby 1.9.2 and rails 3.2.5. Everything is working, but test still execute slowly. Does spork simply not do much on windows because the OS doesn't support forking?
Is there anything else I can do to speed things up?
I also found this similar SO question, and watched the video by Corey Haines on fast testing. I enjoyed the video, but I can't help feeling that something is off when the state of our tools (slow tests due to rails startup time, in this case) dictates how we structure our code. If that slow startup time didn't exist, would there be any need for his methods? On the other hand, with tests taking 10-30 seconds to run, so many of the benefits of TDD are lost that I see his point of view as well.
In case it's relevant, here's the console output from spork as the rspec was executed a couple times:
$ bundle exec spork
Using RSpec
-- Starting to fill pool...
Wait until at least one slave is provided before running tests...
** CTRL+BREAK to stop Spork and kill all ruby slave processes **
Spork is ready and listening on 8989!
-- Rinda Ring Server listening for connections...
-- build slave 1...
Preloading Rails environment
-- build slave 2...
Preloading Rails environment
Loading Spork.prefork block...
Loading Spork.prefork block...
Running tests with args ["--color"]...
--> DRb magazine_slave_service: 1 provided...
--> DRb magazine_slave_service: 2 provided...
<-- take tuple(2); slave.run...
-- (2);run done
Done.
-- build slave 2...
Preloading Rails environment
Loading Spork.prefork block...
Running tests with args ["--color"]...
<-- take tuple(1); slave.run...
-- (1);run done
Done.
-- build slave 1...
Preloading Rails environment
Loading Spork.prefork block...
--> DRb magazine_slave_service: 2 provided...
spork --bootstrap
as the first step. – Trimarangem in rspec-core -v 2.9.0 --no-ri --no-rdoc
. It should reinstall your rspec-core with adding some files in Ruby's bin folder to be able to run your specs simply as:rspec
. – Trimaran