observations about autotest, rspec, and standalone ruby

View: New views
3 Messages — Rating Filter:   Alert me  

observations about autotest, rspec, and standalone ruby

by Chris Kutler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am able to get the Ruby Test Results window to display the results
when I run AutoTest in the IDE if I set the platform to MRI ruby to work
in the IDE.

I am not able to get the Ruby Test Results window to display the results
when I run AutoTest in the IDE if I set the platform to standalone JRuby
1.1.4 or bundled JRuby 1.1.4. However they don't work at the command
line either, as shown below, which probably explains why it doesn't work
in the IDE. Am not sure whether to file a bug and whether to file it
against JRuby or NetBeans.

Furthermore, I do not understand why I get different results with the
bundled JRuby and the standalone JRuby, which I downloaded and installed
separately. I have verified that I have the same Rspec and Zentest versions.

Testing from the command line, I have learned the following.

All platforms:
Rspec 1.1.4
Zentest 3.10

MRI Ruby: works
============
 >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)

1)
'Item should should return right price' FAILED
expected: 3,
     got: 2 (using ==)
./spec/item_spec.rb:13:

Finished in 0.062 seconds

1 example, 1 failure

Bundled JRuby: Runs but no test output
===========================

 >jruby -S autotest
loading autotest/rspec
C:\Program Files\NetBeans Dev
200810091401\ruby2\jruby-1.1.4\bin\jruby.bat -S C:
\Program Files\NetBeans Dev
200810091401\ruby2\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


Separate installation of JRuby: Runs the tests once then emits an error
==============================================

 >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)

1)
'Item should return right price' FAILED
expected: 3,
     got: 2 (using ==)
C:/Documents and Settings/HP_Administrator/My
Documents/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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: observations about autotest, rspec, and standalone ruby

by Chris Kutler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I reported the issue with JRuby at
http://archive.hausfoundation.org/lists/org.codehaus.jruby.user/msg/48F37ABD.6050300@...

However, that does not address the problem that we have with the bundled
JRuby and why its output is different from the JRuby that I downloaded
separately. Why would the outcome be different?

Chris Kutler wrote:

> I am able to get the Ruby Test Results window to display the results
> when I run AutoTest in the IDE if I set the platform to MRI ruby to
> work in the IDE.
>
> I am not able to get the Ruby Test Results window to display the
> results when I run AutoTest in the IDE if I set the platform to
> standalone JRuby 1.1.4 or bundled JRuby 1.1.4. However they don't work
> at the command line either, as shown below, which probably explains
> why it doesn't work in the IDE. Am not sure whether to file a bug and
> whether to file it against JRuby or NetBeans.
>
> Furthermore, I do not understand why I get different results with the
> bundled JRuby and the standalone JRuby, which I downloaded and
> installed separately. I have verified that I have the same Rspec and
> Zentest versions.
>
> Testing from the command line, I have learned the following.
>
> All platforms:
> Rspec 1.1.4
> Zentest 3.10
>
> MRI Ruby: works
> ============
> >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)
>
> 1)
> 'Item should should return right price' FAILED
> expected: 3,
>     got: 2 (using ==)
> ./spec/item_spec.rb:13:
>
> Finished in 0.062 seconds
>
> 1 example, 1 failure
>
> Bundled JRuby: Runs but no test output
> ===========================
>
> >jruby -S autotest
> loading autotest/rspec
> C:\Program Files\NetBeans Dev
> 200810091401\ruby2\jruby-1.1.4\bin\jruby.bat -S C:
> \Program Files\NetBeans Dev
> 200810091401\ruby2\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
>
>
> Separate installation of JRuby: Runs the tests once then emits an error
> ==============================================
>
> >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)
>
> 1)
> 'Item should return right price' FAILED
> expected: 3,
>     got: 2 (using ==)
> C:/Documents and Settings/HP_Administrator/My
> Documents/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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: observations about autotest, rspec, and standalone ruby

by Erno Mononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Chris,


Chris Kutler wrote:
> I reported the issue with JRuby at
> http://archive.hausfoundation.org/lists/org.codehaus.jruby.user/msg/48F37ABD.6050300@... 
>
>
> However, that does not address the problem that we have with the
> bundled JRuby and why its output is different from the JRuby that I
> downloaded separately. Why would the outcome be different?

No idea unfortunately, I'll try out your scenario on Windows. Maybe the
spaces in path cause issues in the case of the bundled distribution
(just shooting in the dark)?

Erno



>
> Chris Kutler wrote:
>> I am able to get the Ruby Test Results window to display the results
>> when I run AutoTest in the IDE if I set the platform to MRI ruby to
>> work in the IDE.
>>
>> I am not able to get the Ruby Test Results window to display the
>> results when I run AutoTest in the IDE if I set the platform to
>> standalone JRuby 1.1.4 or bundled JRuby 1.1.4. However they don't
>> work at the command line either, as shown below, which probably
>> explains why it doesn't work in the IDE. Am not sure whether to file
>> a bug and whether to file it against JRuby or NetBeans.
>>
>> Furthermore, I do not understand why I get different results with the
>> bundled JRuby and the standalone JRuby, which I downloaded and
>> installed separately. I have verified that I have the same Rspec and
>> Zentest versions.
>>
>> Testing from the command line, I have learned the following.
>>
>> All platforms:
>> Rspec 1.1.4
>> Zentest 3.10
>>
>> MRI Ruby: works
>> ============
>> >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)
>>
>> 1)
>> 'Item should should return right price' FAILED
>> expected: 3,
>>     got: 2 (using ==)
>> ./spec/item_spec.rb:13:
>>
>> Finished in 0.062 seconds
>>
>> 1 example, 1 failure
>>
>> Bundled JRuby: Runs but no test output
>> ===========================
>>
>> >jruby -S autotest
>> loading autotest/rspec
>> C:\Program Files\NetBeans Dev
>> 200810091401\ruby2\jruby-1.1.4\bin\jruby.bat -S C:
>> \Program Files\NetBeans Dev
>> 200810091401\ruby2\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
>>
>>
>> Separate installation of JRuby: Runs the tests once then emits an error
>> ==============================================
>>
>> >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)
>>
>> 1)
>> 'Item should return right price' FAILED
>> expected: 3,
>>     got: 2 (using ==)
>> C:/Documents and Settings/HP_Administrator/My
>> Documents/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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...