Module: DatabaseCleaner

Extended by:
Forwardable
Defined in:
lib/database_cleaner/strategy.rb,
lib/database_cleaner/core.rb,
lib/database_cleaner/cleaner.rb,
lib/database_cleaner/version.rb,
lib/database_cleaner/cleaners.rb,
lib/database_cleaner/safeguard.rb,
lib/database_cleaner/deprecation.rb,
lib/database_cleaner/null_strategy.rb,
lib/database_cleaner/spec/database_helper.rb

Overview

Abstract strategy class for orm adapter gems to subclass

Defined Under Namespace

Modules: Spec Classes: Cleaner, Cleaners, Deprecator, NullStrategy, Safeguard, Strategy, UnknownStrategySpecified

Constant Summary collapse

VERSION =
"2.0.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.allow_productionObject

Returns the value of attribute allow_production.



17
18
19
# File 'lib/database_cleaner/core.rb', line 17

def allow_production
  @allow_production
end

.allow_remote_database_urlObject

Returns the value of attribute allow_remote_database_url.



17
18
19
# File 'lib/database_cleaner/core.rb', line 17

def allow_remote_database_url
  @allow_remote_database_url
end

.cleanersObject



22
23
24
# File 'lib/database_cleaner/core.rb', line 22

def cleaners
  @cleaners ||= Cleaners.new
end

.url_allowlistObject Also known as: url_whitelist

Returns the value of attribute url_allowlist.



17
18
19
# File 'lib/database_cleaner/core.rb', line 17

def url_allowlist
  @url_allowlist
end

Class Method Details

.deprecate(message) ⇒ Object



2
3
4
5
6
# File 'lib/database_cleaner/deprecation.rb', line 2

def deprecate message
  method = caller.first[/\d+:in `(.*)'$/, 1].to_sym
  @@deprecator ||= Deprecator.new
  @@deprecator.deprecate method, message
end