Sha256: 291dcdd23739b715e22de1b528b9ed85263f6622428deaf8c0b8b578f650efb1

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

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}
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

  # Stub geocoding
  GeocodeStubbing.stub_geocoding!

  # == 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

1 entries across 1 versions & 1 rubygems

Version Path
on_the_map-0.1.5 spec/spec_helper.rb