Skip to content

Instantly share code, notes, and snippets.

@timwingfield
Created September 18, 2010 02:34
Show Gist options
  • Save timwingfield/585269 to your computer and use it in GitHub Desktop.
Save timwingfield/585269 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
require 'sinatra/base'
require 'my_trip/app'
require 'rack/test'
require 'rspec'
require 'mongoid'
set :environment, :test
set :run, false
set :raise_errors, true
set :logging, false
Mongoid.configure do |config|
name = "MyMongoDbName"
host = "localhost"
config.master = Mongo::Connection.new.db(name)
end
Dir["lib/*"].each {|file| require file}
Dir["my_app/model/*"].each {|file| require file }
require 'mongoid-rspec'
RSpec.configure do |config|
config.include Mongoid::Matchers
config.mock_with :rspec
config.before :all do
Trip.destroy_all()
end
e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment