resolves breaking mongomapper feature

This commit is contained in:
Ben Mabey 2010-02-18 18:37:24 -07:00
parent 56b31498c5
commit fb8431cb51
5 changed files with 10 additions and 3 deletions

View file

@ -7,7 +7,7 @@ strategy = ENV['STRATEGY']
if orm && strategy
begin
require "#{File.dirname(__FILE__)}/../../lib/#{orm}"
require "#{File.dirname(__FILE__)}/../../lib/#{orm}_models"
rescue LoadError
raise "You don't have the #{orm} ORM installed"
end

View file

@ -1,4 +1,4 @@
require 'mongo_mapper'
require 'mongomapper'
::MongoMapper.connection = Mongo::Connection.new('127.0.0.1')
::MongoMapper.database = 'database_cleaner_test'
@ -7,4 +7,11 @@ class Widget
include MongoMapper::Document
key :id, Integer
key :name, String
class << self
#mongomapper doesn't seem to provide this...
def create!(*args)
new(*args).save!
end
end
end