Module: DBQueryMatchers

Defined in:
lib/db_query_matchers.rb,
lib/db_query_matchers/version.rb,
lib/db_query_matchers/configuration.rb,
lib/db_query_matchers/query_counter.rb

Overview

Defines the gem version.

Defined Under Namespace

Classes: Configuration, QueryCounter

Constant Summary collapse

VERSION =
'0.14.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationDBQueryMatchers::Configuration

Gets the current configuration

Returns:



15
16
17
# File 'lib/db_query_matchers.rb', line 15

def self.configuration
  @configuration ||= Configuration.new
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Updates the current configuration.

Examples:

DBQueryMatchers.configure do |config|
  config.ignores = [/SELECT.*FROM.*users/]
end

Yields:



31
32
33
# File 'lib/db_query_matchers.rb', line 31

def self.configure
  yield(configuration)
end

.reset_configurationDBQueryMatchers::Configuration

Resets the current configuration.

Returns:



21
22
23
# File 'lib/db_query_matchers.rb', line 21

def self.reset_configuration
  @configuration = Configuration.new
end