I am able to get ZenTest’s autotest to work with my MRI Ruby
installation but not my JRuby 1.1.4 installation.
Here is what happens when I run autotest with MRI Ruby: (I purposely
wrote a failing test)
MRI Ruby: works
[code]>ruby -S autotest
loading autotest/rspec
c:\ruby\bin\ruby -S c:\ruby\lib\ruby\gems\1.8\gems\rspec-1.1.4\bin\spec
-O spec/
spec.opts spec/item_spec.rb spec/helper.rb
Item
- should return false for wrong price (FAILED - 1)
‘Item should should return right price’ FAILED
expected: 3,
got: 2 (using ==)
./spec/item_spec.rb:13:
Finished in 0.062 seconds
[/code]
With JRuby, it runs once and then stops with an error message.
[code]
jruby -S autotest
loading autotest/rspec
C:\jruby\jruby-1.1.4\bin\jruby.bat -S
C:\jruby\jruby-1.1.4\lib\ruby\gems\1.8\gem
s\rspec-1.1.4\bin\spec -O spec/spec.opts spec/item_spec.rb
spec/helper.rb
Item
- should return right price (FAILED - 1)
‘Item should return right price’ FAILED
expected: 3,
got: 2 (using ==)
C:/NetBeansProjects/RubyApp
lication5/./spec/item_spec.rb:13
C:\jruby\jruby-1.1.4\lib\ruby\gems\1.8\gems\rspec-1.1.4\bin\spec:4
Finished in 0.096873 seconds
1 example, 1 failure
C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/autotest/rspec.rb:31
:in consolidate_failures': target of repeat operator is invalid: /\n(\.\/)?(.*\ .rb):[\d]+:\Z?/ (RegexpError) from C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/autotes t/rspec.rb:30:in
each’
from
C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/autotes
t/rspec.rb:30:in consolidate_failures' from C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/ZenTest-3.10.0/lib/auto test.rb:401:in
handle_results’
from
C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/ZenTest-3.10.0/lib/auto
test.rb:274:in run_tests' from C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/ZenTest-3.10.0/lib/auto test.rb:228:in
get_to_green’
from
C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/ZenTest-3.10.0/lib/auto
test.rb:208:in run' from C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/ZenTest-3.10.0/lib/auto test.rb:206:in
loop’
from
C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/ZenTest-3.10.0/lib/auto
test.rb:206:in run' from C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/ZenTest-3.10.0/lib/auto test.rb:136:in
run’
from
C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/ZenTest-3.10.0/bin/auto
test:55
from
C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/ZenTest-3.10.0/bin/auto
test:19:in `load’
from C:/jruby/jruby-1.1.4/bin/autotest:19 [/code]
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email