[rspec-users] rake spec default environment

David Chelimsky dchelimsky at gmail.com
Mon Oct 29 12:46:04 EDT 2007

On 10/29/07, Steve <vertebrate at gmail.com> wrote:
> On Mon, 29 Oct 2007 10:55:32 -0400, Scott Taylor wrote:
> > Well, usually the schema of the development database is copied to the
> > test one (you wouldn't want to run 100 migrations just because you
> > fired up your test now, would you?)
> >
> > Scott
> This has been discussed recently. If you're doing true BDD, then you're
> going to be using the test env before you even venture into your dev one.
> Like you point out though, it poses a bit of a conundrum. Your tests are
> run frequently, and having all those migrations run will slow things down.
> Yet it's a PITA though to run my dev migrations when making changes before
> I run tests since I haven't had need to run against that env yet.

I don't understand the dilemma here. Here's what I do:

write a spec
watch it fail
decide to add or modify a model to get the spec to pass
write a migration
run migrations
run the specs

I don't think to myself "gee, I'm running migrations and that's my dev
env - I shouldn't have to engage my dev env right now." I just do it.

Simple, no?


More information about the rspec-users mailing list