[rspec-users] rake features does not seem to run rake db:test:prepare

Mark Wilden mark at mwilden.com
Tue Jan 27 12:43:37 EST 2009


On Tue, Jan 27, 2009 at 9:13 AM, James Byrne <lists at ruby-forum.com> wrote:

> James Byrne wrote:
>
> >
> > I moved the task :features => 'db:test:prepare' statement from after
> > task :features => "features:all" to before it, but this does not
> > influence the observed behaviour.
> >
>
> I lied. Evidently moving the the db:test:prepare statement did resolve
> the problem after all.
>

When in doubt, run rake with --trace, and you'll see 1) which tasks are
considered as prequisites, and 2) which of these are actually run.

For example, I tend to do 'rake db:migrate:redo' when I'm writing a
migration, in order to make sure the migration is downable as well as
upable. However, I found that it was leaving schema.rb in the 'down' state.
Running rake with --trace showed me that the task of writing schema.rb was a
prerequisite for both the down and the up - but the dependency had been
satisifed by the first invovation, hence it didn't write schema.rb again
after the up.

///ark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090127/450a321e/attachment.html>


More information about the rspec-users mailing list