[rspec-users] rake db:test:prepare and pending migrations

Pat Maddox pat.maddox at gmail.com
Tue Apr 7 22:05:10 EDT 2009


On Tue, Apr 7, 2009 at 10:32 AM, James B. Byrne <byrnejb at harte-lyne.ca> wrote:
>
> I have run into a minor glitch and would like to know what others
> think.  I am working on a test/expectation and as part of the
> process of debugging I am rolling back db:migrations one step at a
> time to discover where the problem was introduced.
>
> My workflow looks like this:
>
> $ cucumber ... feature:xx
> fail
> $ rake db:rollback
> $ rake db:test:prepare
>  fail ... you have pending migrations.
>
> Now, it seems to me that while testing one is interested only in
> those migrations that have been applied, not which ones are
> available.  It is nice to be notified that unapplied migrations
> exist but I am not sure that one should be constrained to apply them
> to conduct tests.
>
> What do others think?
>
>
> --
> ***          E-Mail is NOT a SECURE channel          ***
> James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
> Harte & Lyne Limited          http://www.harte-lyne.ca
> 9 Brockley Drive              vox: +1 905 561 1241
> Hamilton, Ontario             fax: +1 905 561 0757
> Canada  L8E 3C3
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>

Scott and Mark have given good input.  This is a Rails thing, not an
RSpec thing, so if you want the behavior of db:test:prepare changed
then you'll have to do it at the Rails end.

Pat


More information about the rspec-users mailing list