Permalink
Browse files

moving the default test database to sqlite3, adding a commented out s…

…qlite3 config to database.example.yml, and removing the (now unneeded) rake db:create_test_database task (thanks delagoya)
  • Loading branch information...
1 parent 9027082 commit 7ad7f1353a41d95b30daf6f50cf5c510cf938f03 @jashkenas jashkenas committed Sep 17, 2009
Showing with 13 additions and 17 deletions.
  1. +1 −0 .gitignore
  2. +2 −10 Rakefile
  3. +1 −0 config/config.example.yml
  4. +7 −1 config/database.example.yml
  5. +2 −6 test/config/database.yml
View
@@ -13,4 +13,5 @@ lib/dc
lib/daemons/*.pid
lib/daemons/*.output
lib/daemons/*.log
+test/cloud_crowd_test.db
*.gem
View
@@ -1,5 +1,7 @@
require 'rake/testtask'
+# To get started testing, run `crowd -c test/config load_schema`, in order to
+# create and load a fresh test database, and then `rake test`.
desc 'Run all tests'
task :test do
$LOAD_PATH.unshift(File.expand_path('test'))
@@ -23,14 +25,4 @@ namespace :gem do
end
-namespace :db do
-
- desc "Creates a MySQL 'cloud_crowd_test' database, and loads the schema"
- task :create_test_database do
- sh "mysqladmin -uroot create cloud_crowd_test"
- sh "bin/crowd -c test/config load_schema"
- end
-
-end
-
task :default => :test
@@ -9,6 +9,7 @@
# The storage back-end that you'd like to use for intermediate and final results
# of processing. 's3' and 'filesystem' are supported. 'filesystem' should only
# be used in development, on single-machine installations, or networked drives.
+# If you *are* developing an action, filesystem is certainly faster and easier.
:storage: s3
# Please provide your AWS credentials for S3 storage of job output.
@@ -6,4 +6,10 @@
:username: root
:password:
:socket: /tmp/mysql.sock
-:database: cloud_crowd
+:database: cloud_crowd
+
+# If you'd prefer to use an SQLite database instead, the following configuration
+# will do nicely:
+#
+# :adapter: sqlite3
+# :database: cloud_crowd.db
View
@@ -1,6 +1,2 @@
-:adapter: mysql
-:encoding: utf8
-:username: root
-:password:
-:socket: /tmp/mysql.sock
-:database: cloud_crowd_test
+:adapter: sqlite3
+:database: test/cloud_crowd_test.db

0 comments on commit 7ad7f13

Please sign in to comment.