Autotest not working
ruby, testing | (2)
Autotest broke on me, probably from months of neglect (I've been running tests directly from Textmate), and I had a tough time figuring it out. Whenever I tried to run autotest, I'd get:
[sourcecode language=sh]
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/ZenTest-4.1.3/lib/unit_diff.rb:70:in `gets': No such file or directory - -u (Errno::ENOENT)
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/ZenTest-4.1.3/lib/unit_diff.rb:70:in `parse_input'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/ZenTest-4.1.3/lib/unit_diff.rb:182:in `unit_diff'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/ZenTest-4.1.3/lib/unit_diff.rb:56:in `unit_diff'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/ZenTest-4.1.3/bin/unit_diff:37
from /opt/ruby-enterprise/bin/unit_diff:19:in `load'
from /opt/ruby-enterprise/bin/unit_diff:19
[/sourcecode]
It turns out that the autotest file in rubygems/bin/autotest wasn't using the -s flag in the shebang line and that was causing the -u in the unit_diff program to be interpreted as a filename. To fix, i simply added -s to the end of the shebang line so ...