Sha256: 251bd3ce486eae1228193daf4f034ee893f275f39cccb4ef58bb536367bba49e

Contents?: true

Size: 697 Bytes

Versions: 6

Compression:

Stored size: 697 Bytes

Contents

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

$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'dm-tokyo-cabinet-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::Resource.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::Resource.descendants.delete(model)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shanna-dm-tokyo-cabinet-adapter-0.1.1 test/helper.rb
shanna-dm-tokyo-cabinet-adapter-0.1.2 test/helper.rb
shanna-dm-tokyo-cabinet-adapter-0.1.3 test/helper.rb
shanna-dm-tokyo-cabinet-adapter-0.1.4 test/helper.rb
shanna-dm-tokyo-cabinet-adapter-0.1.5 test/helper.rb
shanna-dm-tokyo-cabinet-adapter-0.1.6 test/helper.rb