This is common test stuff that can be used by Ruby apps.
Tasks
To include tasks, add a Rakefile to your project containing the following:
require 'bengler_test_helper/tasks'
This adds:
rake db:structure:load
: Loads test database with schema fromdb/development_structure.sql
.
Also, it overrides Rails' default tasks:
rake db:migrate
: Automatically saves schema todb/development_structure.sql
by invokingdb:structure:dump
.rake db:test:prepare
: Instead of dumping schema from development database, it loads bootstrap data formdb/bootstrap.sql
and usesdb:structure:load
.
For non-Rails projects, the following Rails-compatible tasks are provided:
rake db:structure:dump
: Saves schema todb/development_structure.sql
like you would expect.