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



231
232
233
234
235
236
237
238
239
240
241
# File 'lib/ar_query_matchers.rb', line 231

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)


243
244
245
# File 'lib/ar_query_matchers.rb', line 243

def supports_block_expectations?
  true
end