[rspec-devel] [ rspec-Bugs-11960 ] spec command line complains about multiple format options when only one

noreply at rubyforge.org noreply at rubyforge.org
Wed Jul 11 13:00:36 EDT 2007


Bugs item #11960, was opened at 2007-07-02 20:06
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11960&group_id=797

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: François Beausoleil (fbos)
Assigned to: Nobody (None)
Summary: spec command line complains about multiple format options when only one

Initial Comment:
$ spec --version
RSpec-1.0.5 (r2081) - BDD for Ruby
http://rspec.rubyforge.org/

$ spec --format specdoc spec/import_spec.rb
/usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.5/lib/spec/runner/options.rb:109:in `parse_format': When using several --format options only one of them can be without a file (RuntimeError)
        from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.5/lib/spec/runner/option_parser.rb:118:in `parse'
        from /usr/local/lib/ruby/1.8/optparse.rb:1260:in `call'
        from /usr/local/lib/ruby/1.8/optparse.rb:1260:in `parse_in_order'
        from /usr/local/lib/ruby/1.8/optparse.rb:1247:in `catch'
        from /usr/local/lib/ruby/1.8/optparse.rb:1247:in `parse_in_order'
        from /usr/local/lib/ruby/1.8/optparse.rb:1241:in `order!'
        from /usr/local/lib/ruby/1.8/optparse.rb:1332:in `permute!'
        from /usr/local/lib/ruby/1.8/optparse.rb:1353:in `parse!'
         ... 14 levels...
        from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.5/lib/spec/runner/command_line.rb:14:in `run'
        from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.5/bin/spec:3
        from /usr/local/bin/spec:16:in `load'
        from /usr/local/bin/spec:16

Anything wrong with my install ?

Thanks !
François

----------------------------------------------------------------------

Comment By: Michael Klishin (michaelklishin)
Date: 2007-07-11 17:00

Message:
Seems that regexp in options.rb is missing / symbol. Will back with a patch shortly if so.

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-07-03 07:13

Message:
I'm unable to reproduce this. If you look at line 109 and 110 of options.rb (where the error is raised), you'll see that @out_used must be true in order for the error to be raised. @out_used is only set to true on line 110, so it sounds like this is a second pass to parse_format.

But I don't see how that could happen. Could you insert some debug statements? Does this happen with RSpec trunk too?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11960&group_id=797


More information about the rspec-devel mailing list