[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Odd behaviour using RSpec from Rakefile

Clifford Heath

1/24/2008 6:36:00 AM

I'm using RSpec with rake, with specs in the "spec" directory,
and the SpecTask is called :test.

When I run "rake test", the ARGV from rake gets picked up by
the RSpec option parser, which adds it (in option_parser.rb:123)
to the @files list. That means that later, rspec decides that
there should be a directory called "test", and an exception is
thrown from spec/runner/options.rb:216, in files_to_load.

I don't know what the expected behaviour is here, but I know that
this isn't it! It seems that RSpec shouldn't be using ARGV here,
since rake, not rspec, is the main program.

Can someone please comment on the correct way to fix this?

Clifford Heath.
1 Answer

David Chelimsky

1/24/2008 2:54:00 PM

0

On Jan 24, 2008 12:39 AM, Clifford Heath <no@spam.please.net> wrote:
> I'm using RSpec with rake, with specs in the "spec" directory,
> and the SpecTask is called :test.
>
> When I run "rake test", the ARGV from rake gets picked up by
> the RSpec option parser, which adds it (in option_parser.rb:123)
> to the @files list. That means that later, rspec decides that
> there should be a directory called "test", and an exception is
> thrown from spec/runner/options.rb:216, in files_to_load.
>
> I don't know what the expected behaviour is here, but I know that
> this isn't it! It seems that RSpec shouldn't be using ARGV here,
> since rake, not rspec, is the main program.
>
> Can someone please comment on the correct way to fix this?

The best way to get things fixed in RSpec is to enter a ticket in
RSpec's tracker at http://rspec.lightho....

Cheers,
David

>
> Clifford Heath.
>
>