Sha256: 6758a2d819013d3d77156fd7a1c18a0445f7b0a907a453465587b6a495e3bacd
Contents?: true
Size: 1.11 KB
Versions: 6
Compression:
Stored size: 1.11 KB
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'rr' require 'mongoid' require 'mongoid_nested_set' require 'remarkable/mongoid' if ENV['COVERAGE'] == 'yes' require 'simplecov' require 'simplecov-rcov' class SimpleCov::Formatter::MergedFormatter def format(result) SimpleCov::Formatter::HTMLFormatter.new.format(result) SimpleCov::Formatter::RcovFormatter.new.format(result) end end SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter SimpleCov.start end module Mongoid::Acts::NestedSet::Matchers end Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} Dir["#{File.dirname(__FILE__)}/models/*.rb"].each {|file| require file } Dir["#{File.dirname(__FILE__)}/matchers/*.rb"].each {|file| require file } Mongoid.configure do |config| config.connect_to("mongoid_nested_set_test") config.allow_dynamic_fields = false end RSpec.configure do |config| config.mock_with :rr config.include(Mongoid::Acts::NestedSet::Matchers) config.after(:each) do Mongoid::Config.purge! end end
Version data entries
6 entries across 5 versions & 3 rubygems