Sha256: b9a7c109a2a46e43551a1c3bf01e52ab9fae1c6194dd7211a9e084a94d4525ab

Contents?: true

Size: 1.02 KB

Versions: 66

Compression:

Stored size: 1.02 KB

Contents

require 'mongo_mapper'

::MongoMapper.connection = Mongo::Connection.new('127.0.0.1')
::MongoMapper.database = 'database_cleaner_test'

class MongoMapperWidget
  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

class MongoMapperWidgetUsingDatabaseOne
  include MongoMapper::Document

  connection = Mongo::Connection.new('127.0.0.1')
  set_database_name = 'database_cleaner_test_one'

  key :id, Integer
  key :name, String

  class << self
    #mongomapper doesn't seem to provide this...
    def create!(*args)
      new(*args).save!
    end
  end
end

class MongoMapperWidgetUsingDatabaseTwo
  include MongoMapper::Document

  connection = Mongo::Connection.new('127.0.0.1')
  set_database_name = 'database_cleaner_test_two'

  key :id, Integer
  key :name, String

  class << self
    #mongomapper doesn't seem to provide this...
    def create!(*args)
      new(*args).save!
    end
  end
end

Version data entries

66 entries across 55 versions & 8 rubygems

Version Path
database_cleaner-1.6.2 examples/lib/mongomapper_models.rb
database_cleaner-1.6.1 examples/lib/mongomapper_models.rb
database_cleaner-1.6.0 examples/lib/mongomapper_models.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/database_cleaner-1.5.3/examples/lib/mongomapper_models.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/database_cleaner-1.5.3/examples/lib/mongomapper_models.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/database_cleaner-1.5.3/examples/lib/mongomapper_models.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/database_cleaner-1.5.3/examples/lib/mongomapper_models.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/database_cleaner-1.5.3/examples/lib/mongomapper_models.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/database_cleaner-1.5.3/examples/lib/mongomapper_models.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/database_cleaner-1.5.3/examples/lib/mongomapper_models.rb
database_cleaner-1.5.3 examples/lib/mongomapper_models.rb
database_cleaner-1.5.2 examples/lib/mongomapper_models.rb
database_cleaner-1.5.1 examples/lib/mongomapper_models.rb
database_cleaner-1.5.0 examples/lib/mongomapper_models.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/database_cleaner-1.4.1/examples/lib/mongomapper_models.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/database_cleaner-1.4.1/examples/lib/mongomapper_models.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/database_cleaner-1.4.1/examples/lib/mongomapper_models.rb
database_cleaner-1.4.1 examples/lib/mongomapper_models.rb
database_cleaner-1.4.0 examples/lib/mongomapper_models.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/database_cleaner-1.2.0/examples/lib/mongomapper_models.rb