Sha256: 6e10ae38416cbe7e18eb860fdcf847f06b6586edf758b85ce09d86598478a460

Contents?: true

Size: 553 Bytes

Versions: 2

Compression:

Stored size: 553 Bytes

Contents

require 'rubygems'
%w{test/unit shoulda factory_girl mongo_mapper factories}.each { |lib| require lib }
require 'growler'
require File.expand_path(File.dirname(__FILE__) + '/../lib/grip')

TEST_DB = 'test-grip'

MongoMapper.database = TEST_DB

class Test::Unit::TestCase
  def teardown
    MongoMapper.database.collections.each do |coll|
      coll.remove  
    end
  end

  # Make sure that each test case has a teardown
  # method to clear the db after each test.
  def inherited(base)
    base.define_method teardown do 
      super
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
grip-0.6.3 test/test_helper.rb
grip-0.6.2 test/test_helper.rb