JRuby 1.3.0 with AutoTest
I had some trouble getting JRuby 1.3.0 and ZenTest 4.1.3 autotest to work together. Part of the problem is that the subprocess that launches autotest ignores any attempt to turn ObjectSpace on. The other part of the problem is how jruby parses -u after the unit_diff command. Here’s a way to hack in fixes for each problem:
Open zentest.rb in the ZenTest gem lib directory and add the following to the top.
if RUBY_PLATFORM == 'java' require 'jruby' JRuby.objectspace = true end
Open autotest.rb and in the initialize of the Autotest class change
self.unit_diff = "unit_diff -u"
if RUBY_PLATFORM == 'java' self.unit_diff = "unit_diff" else self.unit_diff = "unit_diff -u" end