Browse files

Close ActiveRecord connections at end of prefork

In rspec, rake runs rake db:test:prepare, which drops
the test database, and if you don't close the connection
spork prevents the database from being dropped.
  • Loading branch information...
Matthew Kocher & Sarah Mei
Matthew Kocher & Sarah Mei committed Jun 14, 2012
1 parent 1b0ba31 commit cc27599065d82ed30dfe21f0a793917ff921cd01
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/spork/app_framework/rails.rb
@@ -6,6 +6,7 @@ def preload(&block)
ENV["RAILS_ENV"] ||= 'test'
+ ActiveRecord::Base.remove_connection if defined?(ActiveRecord)
def entry_point

0 comments on commit cc27599

Please sign in to comment.