Module: ArQueryMatchers::ArQueryMatchers::MatcherConfiguration

Defined in:
lib/ar_query_matchers.rb

Overview

Shared methods that are included in the matchers. They configure it and ensure we get consistent and human readable error messages

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



312
313
314
315
316
317
318
319
320
321
322
# File 'lib/ar_query_matchers.rb', line 312

def self.included(base)
  if base.respond_to?(:failure_message)
    base.failure_message do |_actual|
      failure_text
    end
  else
    base.failure_message_for_should do |_actual|
      failure_text
    end
  end
end

Instance Method Details

#supports_block_expectations?Boolean

Returns:

  • (Boolean)


324
325
326
# File 'lib/ar_query_matchers.rb', line 324

def supports_block_expectations?
  true
end