Sha256: d630a5619ba830a5b19ae36c99100587f353d91a7d6055679573be0563a8c41d

Contents?: true

Size: 683 Bytes

Versions: 1

Compression:

Stored size: 683 Bytes

Contents

require 'rubygems'
require 'test/unit'
require 'shoulda'

$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'dm-tokyo-adapter'

class Test::Unit::TestCase
end

DataMapper.setup(:default, {
  :adapter  => 'tokyo_cabinet',
  :database => 'tc',
  :path     => File.dirname(__FILE__)
})

class Test::Unit::TestCase
  include Extlib::Hook

  # after :teardown do
  def teardown
    descendants = DataMapper::Model.descendants.dup.to_a
    while model = descendants.shift
      descendants.concat(model.descendants) if model.respond_to?(:descendants)
      Object.send(:remove_const, model.name.to_sym)
      DataMapper::Model.descendants.delete(model)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shanna-dm-tokyo-adapter-0.2.1 test/helper.rb