[ 
https://issues.apache.org/jira/browse/BUILDR-252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674303#action_12674303
 ] 

Rhett Sutphin commented on BUILDR-252:
--------------------------------------

I noticed with trunk buildr and rspec 1.1.12, buildr was reinstalling the rspec 
gem in jruby on every test run.  I traced this back to the automatic installer 
code in TestFramework::JRubyBased#jruby_gem.  It is throwing a load error 
"Could not find RubyGem cucumber (>= 0.1.13)" when the rspec gem is loaded.  
The automatic installer code interprets the load error to mean that rspec isn't 
installed, so it reinstalls it.  Then it requires it again and it fails again, 
but this time the exception bubbles out and kills the test run.  This is why 
result.yaml wasn't being written.

I'm not sure what the deal is with the rspec gem.  I get the same behavior when 
I install it manually under jruby -- it doesn't install cucumber itself, but 
then if I require the rspec gem in irb, it throws the same "Could not find 
RubyGem cucumber" error.  Under matz ruby, installing the rspec 1.1.12 gem does 
not install cucumber and it also doesn't complain if it isn't present.  The 
rspec gemspec has a dev dependency on cucumber, but I'm not sure why that would 
cause the different behavior on jruby and ruby that I'm seeing.

> Rspec test runner fails after first pending spec
> ------------------------------------------------
>
>                 Key: BUILDR-252
>                 URL: https://issues.apache.org/jira/browse/BUILDR-252
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.3
>         Environment: OS X 10.5 built-in ruby (running buildr)
> JRuby 1.1.3 (running rspec in buildr)
>            Reporter: Rhett Sutphin
>
> I have an application with an integrated test suite which is using(:rspec).  
> If I run the full suite (i.e., with `buildr integration`), it fails after the 
> first spec file with an exception like this:
> 8 examples, 0 failures, 1 pending
> /Library/Ruby/Gems/1.8/gems/buildr-1.3.3/lib/buildr/java/test_result.rb:43:in 
> `dump_yaml': wrong number of arguments(1 for 2) (ArgumentError)
>       from 
> /Library/Ruby/Gems/1.8/gems/buildr-1.3.3/lib/buildr/java/test_result.rb:43:in 
> `guard'
>       from 
> /Users/rsutphin/studycalendar/git/trunk/test/restful-api/target/spec/runner.rb:34
> The exception happens whether or not the first file has any failing specs in 
> it.
> If I only run one spec (i.e., with `buildr integration:foo_spec` where 
> foo_spec only matches one spec file), it does not fail.  If I use a pattern 
> which matches multiple specs, it fails with the same exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to