Sha256: 142187dc8381da49a4b3c6e78817516a7a58672aec79eaaa56008120bc14bb13

Contents?: true

Size: 956 Bytes

Versions: 4

Compression:

Stored size: 956 Bytes

Contents

require 'rspec'
require 'on_the_map'

require 'hashie'
require 'concerned'

require 'mongoid'
require 'moped'

require 'factory_girl'

require 'geocoder'

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|
  Mongoid.configure do |mongoid_config|
    mongoid_config.connect_to('mongoid_map_test')
  end  

  # Remove this line if you don't want RSpec's should and should_not
  # methods or matchers
  require 'rspec/expectations'
  config.include RSpec::Matchers

  config.include FactoryGirl::Syntax::Methods

  # == Mock Framework
  config.mock_with :rspec

  config.include Mongoid::Matchers

  # Clean up the database
  require 'database_cleaner'
  config.before(:suite) do
    DatabaseCleaner[:mongoid].strategy = :truncation
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
on_the_map-0.1.4 spec/spec_helper.rb
on_the_map-0.1.3 spec/spec_helper.rb
on_the_map-0.1.1 spec/spec_helper.rb
on_the_map-0.1.0 spec/spec_helper.rb