[rspec-users] Problem running RSpec tests with Rails
ashley.moran at patchspace.co.uk
Mon Jul 26 17:14:40 EDT 2010
On 26 Jul 2010, at 6:36 PM, Bruno Cardoso wrote:
> What both solutions (from Ashley and David) do is not modify the BD in
> anyway, so nothing gets dropped and nothing is created. This resolves
> the problem but what if I want a clean installation in each test run? Is
> there a way to keep my "schema_migrations" table or remove the check for
> migration scripts? I would still like to recreate the rest of the
One way is to avoid rake entirely - you could run the specs with `spec spec` or even just use autotest.
If you want to just empty the data from the tables you need database_cleaner.
If you want the database rebuilt as necessary when migrations change, you could use my database_resetter, plug plug :D
Let me know if you're trying to do something other than one of these. (It's late, I have a habit of talking nonsense when I'm tired...)
 eg http://ph7spot.com/musings/getting-started-with-autotest
More information about the rspec-users