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.6.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationDBQueryMatchers::Configuration

Gets the current configuration

Returns:



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

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:



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

def self.configure
  yield(configuration)
end

.reset_configurationDBQueryMatchers::Configuration

Resets the current configuration.

Returns:



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

def self.reset_configuration
  @configuration = Configuration.new
end