Permalink
Browse files

Merge branch 'test-config' of https://github.com/josiahivey/browsercms

…into josiahivey-test-config
  • Loading branch information...
2 parents bdf29f3 + 33410e7 commit 9347c72a93292a3c472e9e1bd880136662d1df19 @peakpg peakpg committed Oct 19, 2012
View
@@ -4,7 +4,7 @@ log/*.log
tmp/**/*
db/*.sqlite3
db/schema.rb
-config/database.yml
+config/database*.yml
public/images/tuneup
public/javascripts/tuneup
public/stylesheets/tuneup
@@ -21,5 +21,6 @@ doc/api
.bundle/*
test/dummy/db/backups/*
test/dummy/.sass-cache
+test/dummy/config/database*.yml
.sass-cache
db/backups
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -36,4 +36,17 @@ namespace :test do
Rake::Task['db:create'].invoke
system "rake db:migrate test"
end
+
+ desc 'Copy database.yml files for running tests'
+ task :setup do
+ drivers = %w(jdbcmysql mysql postgres sqlite3).each do |driver|
+ source = File.join('config', "database.#{driver}.yml.example")
+ destination = File.join('config', "database.#{driver}.yml")
+ cp(source, destination, :verbose => true)
+ end
+
+ source = File.join('test/dummy/config', "database.yml.example")
+ destination = File.join('test/dummy/config', "database.yml")
+ cp(source, destination, :verbose => true)
+ end
end

0 comments on commit 9347c72

Please sign in to comment.