This includes a plugin for spork to enable Test::Unit support for spork. It also comes with a very bare-bones drb client to run tests.
Information about spork
gem, how to install it and run is here https://github.com/sporkrb/spork
Then, once spork is running, invoke testdrb
:
$ testdrb path/to/your_test.rb
to run your tests under Spork.
Good part is that you still able to run your tests in old
manner, like
$ rake test TEST=path/to/your_test.rb
or simply
$ rake test
to tun all test suite.
This gem autoloads test_helper.rb
file, so there is no need to require it in every test file.
But if you have already a bunch of tests WITH require 'test_helper.rb'
at the bottom of each test file and you need to
be compatible with some CI servers (you don't want to remove that line) then to avoid error message like "no such file to load test_helper.rb
" you will need to add these extra config line to Spork.prefork
block:
Spork.prefork do
$LOAD_PATH << "test/"
end
Now you should be compatible with Spork and CI servers.