Sha256: 19af9e6d17e3b286587cde861b359f529b8d9cc9d22ecfa579c732d8a63a6109

Contents?: true

Size: 723 Bytes

Versions: 2

Compression:

Stored size: 723 Bytes

Contents

require 'coveralls'
Coveralls.wear!

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

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

MODELS = File.join(File.dirname(__FILE__), "models")
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

2 entries across 2 versions & 1 rubygems

Version Path
mongoid_rating-0.1.5 spec/spec_helper.rb
mongoid_rating-0.1.4 spec/spec_helper.rb