Odd behaviour using RSpec from Rakefile

Discussion in 'Ruby' started by Clifford Heath, Jan 24, 2008.

  1. 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.
     
    Clifford Heath, Jan 24, 2008
    #1
    1. Advertising

  2. On Jan 24, 2008 12:39 AM, Clifford Heath <> 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.lighthouseapp.com.

    Cheers,
    David

    >
    > Clifford Heath.
    >
    >
     
    David Chelimsky, Jan 24, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Gabriele
    Replies:
    1
    Views:
    165
    Suraj Kurapati
    Dec 5, 2006
  2. David Chelimsky
    Replies:
    0
    Views:
    115
    David Chelimsky
    Sep 15, 2009
  3. Jean-Julien Fleck

    Documenting Rakefile using rdoc

    Jean-Julien Fleck, Apr 17, 2010, in forum: Ruby
    Replies:
    10
    Views:
    218
    Robert Dober
    Apr 20, 2010
  4. David Chelimsky
    Replies:
    0
    Views:
    113
    David Chelimsky
    Oct 3, 2010
  5. David Chelimsky
    Replies:
    0
    Views:
    109
    David Chelimsky
    Oct 10, 2010
Loading...

Share This Page