require 'rake'
begin
  require 'rspec/core/rake_task'
  task(:spec).clear
  RSpec::Core::RakeTask.new(:spec) do |t|
    t.verbose = false
  end
rescue LoadError
end

require 'rake'
begin
  require 'rspec/core/rake_task'
  task(:spec).clear
  RSpec::Core::RakeTask.new(:spec => 'db:test:prepare') do |t|
    t.verbose = false
  end
rescue LoadError
end

Make "rake" depend on "rake db:test:prepare".
Make "rake" depend on "rake db:test:prepare".

This also tests for pending migrations.
