Sha256: a67a3cf2c176437582242e1f7c8d8375aa6c51186e755433ff34b4189b8b7344

Contents?: true

Size: 810 Bytes

Versions: 5

Compression:

Stored size: 810 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rubygems'

gem 'mocha', '>= 0.9.8'

require 'mocha'
require 'mongoid'
require 'gatoroid'
require 'bson'
require 'rspec'
require 'rspec/autorun'

Time.zone = "UTC"
Mongoid.configure do |config|
  name = "gatoroid_test"
  host = "localhost"
  port = "27017"
  config.master = Mongo::Connection.new.db(name)
end

RSpec.configure do |config|
  config.mock_with :mocha

  # keep our mongo DB all shiney and new between tests
  require 'database_cleaner'
  
  config.before(:suite) do
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.orm = "mongoid"
  end
  
  config.before(:each) do
    DatabaseCleaner.clean
  end
  
  config.after(:each) do
    DatabaseCleaner.clean
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gatoroid-0.2.17 spec/spec_helper.rb
gatoroid-0.2.16 spec/spec_helper.rb
gatoroid-0.2.15 spec/spec_helper.rb
gatoroid-0.2.14 spec/spec_helper.rb
gatoroid-0.2.13 spec/spec_helper.rb