Sha256: 7297d250cce21084cb35a57c9a37b3be7ddf851c4cc8a71717ebaf16c30fc304

Contents?: true

Size: 534 Bytes

Versions: 2

Compression:

Stored size: 534 Bytes

Contents

%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.1 test/test_helper.rb
grip-0.6.0 test/test_helper.rb