Sha256: 585373dafd8cef9bb64c5456e83fc3f1d6a375751301ed7baa68a9026799e1ca

Contents?: true

Size: 576 Bytes

Versions: 2

Compression:

Stored size: 576 Bytes

Contents

$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'grip'
require 'test/unit'
require 'shoulda'
require 'factory_girl'
require 'factories'
require 'RMagick'

TEST_DB = 'test-grip' unless Object.const_defined?("TEST_DB")

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.7.3 test/test_helper.rb
grip-0.7.2 test/test_helper.rb