Sha256: 685250cc13f9e4dca2f26e21a398a970c4f73f98df20cea8d386fa0c76444cab
Contents?: true
Size: 722 Bytes
Versions: 3
Compression:
Stored size: 722 Bytes
Contents
$LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib")) MODELS = File.join(File.dirname(__FILE__), "models") $LOAD_PATH.unshift(MODELS) require "mongoid" require "enough_fields" require "rspec" Mongoid.configure do |config| name = "mongoid_test" host = "localhost" config.master = Mongo::Connection.new.db(name) config.logger = nil # config.slaves = [ # Mongo::Connection.new(host, 27018, :slave_ok => true).db(name) # ] end Dir[ File.join(MODELS, "*.rb") ].sort.each { |file| require File.basename(file) } Rspec.configure do |config| config.after :suite do Mongoid.master.collections.select {|c| c.name !~ /system/ }.each(&:drop) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
enough_fields-0.0.3 | spec/spec_helper.rb |
enough_fields-0.0.2 | spec/spec_helper.rb |
enough_fields-0.0.1 | spec/spec_helper.rb |