Sha256: fb511feeafc0963d80459181563502ca259bc4a7b78cf1f90c7bbad832f3bfe5
Contents?: true
Size: 675 Bytes
Versions: 6
Compression:
Stored size: 675 Bytes
Contents
require 'database_cleaner/truncation_base' module DatabaseCleaner module CouchPotato class Truncation < DatabaseCleaner::TruncationBase 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 def clean database.recreate! end private def database ::CouchPotato.couchrest_database end end end end
Version data entries
6 entries across 6 versions & 4 rubygems