class DatabaseCleaner::CouchPotato::Truncation

Public Class Methods

new(options = {}) click to toggle source
Calls superclass method
# File lib/database_cleaner/couch_potato/truncation.rb, line 8
def initialize(options = {})
  if options.has_key?(:only) || options.has_key?(:except)
    raise ArgumentError, "The :only and :except options are not available for use with CouchPotato/CouchDB."
  elsif !options.empty?
    raise ArgumentError, "Unsupported option. You specified #{options.keys.join(',')}."
  end
  super
end

Public Instance Methods

clean() click to toggle source
# File lib/database_cleaner/couch_potato/truncation.rb, line 17
def clean
  database.recreate!
end

Private Instance Methods

database() click to toggle source
# File lib/database_cleaner/couch_potato/truncation.rb, line 23
def database
  ::CouchPotato.couchrest_database
end