Created
September 18, 2010 02:34
-
-
Save timwingfield/585269 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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