Sha256: 1ed71e566131d89cd0d59023c7d5652ef6a2b81a9bffb58fd2533cf62c63340f
Contents?: true
Size: 808 Bytes
Versions: 2
Compression:
Stored size: 808 Bytes
Contents
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib" require "rubygems" require "rspec" require "sham" module Spec module MongoMapper def self.configure! ::MongoMapper.database = "machinist_mongomapper" ::Rspec.configure do |config| config.before(:each) { Sham.reset } config.after(:all) { ::MongoMapper.database.collections.each { |c| c.remove } } end end end module Mongoid def self.configure! ::Mongoid.configure do |config| config.master = Mongo::Connection.new.db("machinist_mongoid") config.allow_dynamic_fields = true end ::Rspec.configure do |config| config.before(:each) { Sham.reset } config.after(:all) { ::Mongoid.master.collections.each { |c| c.remove } } end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
machinist_mongo-1.2.0 | spec/spec_helper.rb |
machinist_mongo-2.0.0.pre | spec/spec_helper.rb |