[rspec-users] Update RSpec but have a problem!

Peter Jaros peter.a.jaros at gmail.com
Sat Dec 6 15:08:17 EST 2008

On Sat, Dec 6, 2008 at 12:00 PM, Antonio Faust45 <lists at ruby-forum.com> wrote:

> rake spec
> ** Invoke spec (first_time, not_needed)
> and specs not started!

Oh!  I' having the same problem and I just solved it!  Well, half-solved it.

Rake, like make, operates on files.  If you say "make somebinary" make
will run certain command expecting that they will build the file
"somebinary".  It knows which source files that file depends on, so if
"somebinary" exists and is newer than the files it depends on it won't
bother to run the commands.  It's already the newest version.

Rake is usually used for bits of script, and not to build files.
However, it can be used much like make.  Here's what's going on.  Rake
doesn't know about a task named "spec".  It *does* know about a
*directory* named "spec" though, and it will try to "build" it.  It
doesn't seem to depend on anything, though, so the task is marked
"not_needed".  It's like trying to build "somebinary" when make knows
it's already up-to-date.

So that explains the silent treatment.  But why don't you have a spec
task?  That, you'll have to figure out for yourself.  Is this a Rails
project?  If so, look for a lib/tasks/rspec.rake file.  If not, look
in your Rakefile.  If you don't have a :spec task defined in there,
there's your problem!  :)


More information about the rspec-users mailing list