Skip to content

Commit

Permalink
Set up test db when running rake
Browse files Browse the repository at this point in the history
  • Loading branch information
smartinez87 committed Aug 3, 2011
1 parent 76fe686 commit 2f2abda
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
exception_notification (2.4.1)
actionmailer (~> 3.0.9)
actionmailer (>= 3.0.4)

GEM
remote: http://rubygems.org/
Expand Down Expand Up @@ -79,5 +79,5 @@ PLATFORMS

DEPENDENCIES
exception_notification!
rails (~> 3.0.9)
sqlite3 (~> 1.3.4)
rails (>= 3.0.4)
sqlite3 (>= 1.3.4)
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Bundler::GemHelper.install_tasks

require 'rake/testtask'

unless File.exists? "test/dummy/db/test.sqlite3"
sh "cd test/dummy; rake db:migrate; rake db:test:prepare; cd ../../;"
end

Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
Expand Down
2 changes: 1 addition & 1 deletion test/dummy/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: ../../..
specs:
exception_notification (2.4.1)
actionmailer (~> 3.0.9)
actionmailer (>= 3.0.4)

GEM
remote: http://rubygems.org/
Expand Down

0 comments on commit 2f2abda

Please sign in to comment.