test/helper.rb in swift-0.10.0 vs test/helper.rb in swift-0.11.0
- old
+ new
@@ -1,10 +1,13 @@
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+$:.unshift(File.join(File.dirname(__FILE__), '..', 'test'))
require 'minitest/spec'
require 'minitest/unit'
+require 'minitest_teardown_hack'
require 'swift'
+require 'swift/migrations'
require 'etc'
class MiniTest::Spec
def self.supported_by *adapters, &block
adapter_defaults = { Swift::DB::Sqlite3 => { db: ':memory:' } }
@@ -18,9 +21,12 @@
end
describe("Adapter #{adapter.name}") do
before do
Swift.setup :default, adapter, connection_defaults.merge(adapter_defaults.fetch(adapter, {}))
+ end
+ after do
+ Swift.db.close
end
block.call(adapter)
end
end
end