The thing I really needed was server like Spork DRb or Zeus. I’ve tried with Spork at first and failed, but then Momiji appeared, and I gave it one more shot. I was hoping that Zeus is better and less configuration is needed… and it’s true, but it’s not very friendly with Test::Unit.
But with just few tweaks it’s fast to switch to MiniTest.
- gem 'test-unit' Add a comment to this line + gem 'minitest' + gem 'minitest-reporters' + gem 'zeus'
test_helper.rb (I was using Test::Unit assert_false – apparently it’s not included in MiniTest, deprecate means: I’ll fix it some day):
+ +require 'minitest/reporters' +MiniTest::Reporters.use! + +module MiniTest::Assertions + include ActiveSupport::Deprecation + alias_method :assert_false, :refute + deprecate :assert_false => 'monkeypatch to use Mintest suite, use refute instead of assert_false' +end
So now running single test takes less than a second (except first run, when Zeus seems to warm up). I don’t waste around 10-15 seconds for env to initialize (every time!).
For some reason all rake tests (ctrl+alt+r -> test) are not going through zeus, maybe it’ll be fixed before RubyMine 6.0 release