Sha256: f0bc93da11a05f84eba0a6ed32b20df0dca0c7cd08cc30f3d65c55488479da5d

Contents?: true

Size: 724 Bytes

Versions: 4

Compression:

Stored size: 724 Bytes

Contents

require 'coveralls'
Coveralls.wear!

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))

MODELS = File.join(File.dirname(__FILE__), "models")

require "rubygems"
require "rspec"
require "mongoid"
require "database_cleaner"
require "mongoid_rating"

Dir["#{MODELS}/*.rb"].each { |f| require f }

Mongoid.configure do |config|
  config.connect_to "mongoid_rating_test"
end
Mongoid.logger = Logger.new($stdout)

DatabaseCleaner.orm = "mongoid"

RSpec.configure do |config|
  config.before(:all) do
    DatabaseCleaner.strategy = :truncation
  end

  config.before(:each) do
    DatabaseCleaner.start
  end

  config.after(:each) do
    DatabaseCleaner.clean
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid_rating-0.1.3 spec/spec_helper.rb
mongoid_rating-0.1.2 spec/spec_helper.rb
mongoid_rating-0.1.1 spec/spec_helper.rb
mongoid_rating-0.1.0 spec/spec_helper.rb