Skip to content

Commit 159b6be

Browse files
committed
add rake task for copying test database.yml files
1 parent cc2d5e6 commit 159b6be

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/tasks/core_tasks.rake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,13 @@ namespace :test do
3636
Rake::Task['db:create'].invoke
3737
system "rake db:migrate test"
3838
end
39+
40+
desc 'Copy database.yml files for running tests'
41+
task :setup do
42+
drivers = %w(jdbcmysql mysql postgres sqlite3).each do |driver|
43+
source = File.join('config', "database.#{driver}.yml.example")
44+
destination = File.join('config', "database.#{driver}.yml")
45+
cp(source, destination, :verbose => true)
46+
end
47+
end
3948
end

0 commit comments

Comments
 (0)