Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Example tddium db hook
# Copyright (c) 2011 Solano Labs All Rights Reserved
# lib/tasks/tddium.rake
namespace :tddium do
desc "default tddium environment db setup task"
task :db_hook do
Rake::Task["db:create"].invoke
if File.exists?(File.join(Rails.root, "db", "schema.rb"))
Rake::Task['db:schema:load'].invoke
else
Rake::Task['db:migrate'].invoke
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment