Created
December 25, 2011 21:59
-
-
Save tddium/1519804 to your computer and use it in GitHub Desktop.
Example tddium db hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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