Skip to content

Commit

Permalink
Try this approach for creating the db ourselves
Browse files Browse the repository at this point in the history
  • Loading branch information
rsanheim committed Aug 19, 2009
1 parent da7e13d commit 42d9035
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,17 @@ task :test do
exec "cd invoicing; rake test"
end

task :default => :test
task :create_db do
cmd_string = %[mysqladmin create ept_invoicing_test -u build]
system cmd_string
end

def runcoderun?
ENV["RUN_CODE_RUN"]
end

if runcoderun?
task :default => [:create_db, :test]
else
task :default => :test
end
2 changes: 1 addition & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
test:
adapter: mysql
encoding: utf8
database: invoicing_test
database: ept_invoicing_test
host: localhost
username: build
password:

0 comments on commit 42d9035

Please sign in to comment.