[ 
https://issues.apache.org/jira/browse/BUILDR-252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rhett Sutphin updated BUILDR-252:
---------------------------------

    Summary: Rspec test runner fails after first pending spec  (was: Rspec test 
runner fails after first file when running an entire suite)

The actual problem is not with spec files, but rather with pending specs.  
Rspec-1.1.4 is throwing an exception when it hits a pending spec:

--- !ruby/exception:Buildr::TestFramework::TestResult::Error
backtrace: 
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/reporter.rb:110:in
  `example_pending'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/reporter.rb:110:in
  `example_pending'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/reporter.rb:109:in
  `each'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/reporter.rb:109:in
  `example_pending'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/reporter.rb:29:in
  `example_finished'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/example/example_methods.rb:32:in
  `execute'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/example/example_group_methods.rb:303:in
  `execute_examples'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/example/example_group_methods.rb:302:in
  `each'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/example/example_group_methods.rb:302:in
  `execute_examples'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/example/example_group_methods.rb:130:in
  `run'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/example_group_runner.rb:22:in
  `run'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/example_group_runner.rb:21:in
  `each'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/example_group_runner.rb:21:in
  `run'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/options.rb:106:in
  `run_examples'
- 
/Users/rsutphin/.jruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner/command_line.rb:19:in
  `run'
- [...]/test/restful-api/target/spec/runner.rb:35
- /Library/Ruby/Gems/1.8/gems/buildr-1.3.3/lib/buildr/java/test_result.rb:41:in 
`guard'
- [...]/test/restful-api/target/spec/runner.rb:34
message: wrong number of arguments(2 for 3)

The 1 for 2 wrong number of arguments error above was hiding this error.  So 
both the error handling of the rspec TestFramework and whatever is causing this 
rspec exception need to be addressed. 

> 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