Module: DatabaseCleaner::Generic::Base

Included in:
ActiveRecord::Base, DataMapper::Base, MongoMapper::Base, Mongoid::Base, Moped::Base, Neo4j::Base, Redis::Base, Sequel::Base
Defined in:
lib/database_cleaner/generic/base.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


5
6
7
# File 'lib/database_cleaner/generic/base.rb', line 5

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#cleaning(&block) ⇒ Object


13
14
15
16
17
# File 'lib/database_cleaner/generic/base.rb', line 13

def cleaning(&block)
  start
  yield
  clean
end

#dbObject


9
10
11
# File 'lib/database_cleaner/generic/base.rb', line 9

def db
  :default
end