[rspec-users] RSpec makes me want to write better code

Ashley Moran ashley.moran at patchspace.co.uk
Sat Sep 27 19:19:05 EDT 2008

On Sep 27, 2008, at 12:16 am, David Chelimsky wrote:

> This is really a deficiency of ActiveRecord migrations in my view.
> DataMapper, for example, offers auto-migrations. You just add a
> property to your model file and it takes care of the migration for
> you. Of course, the way it does this is to drop the table and re-write
> it, so you don't want to do THAT in production :) But for agile dev,
> it's a much nicer process.

Static migrations are essential, I think.  Without them, you can't  
have repeatability.  But auto migrations are cool for playing around  
with stuff.  Hobo migrations[1] nails it.  You define the attributes  
in the model class, and it compares your models and development  
database to generate static migration files.

Unfortunately Hobo is very tied to Rails and AR.  But DataMapper  
already tracks attributes, so I wonder how hard it'd be to port...


[1] http://hobocentral.net/hobofields/


More information about the rspec-users mailing list