class Object

Public Instance Methods

count_str(klass, count) click to toggle source
# File lib/active_record_block_matchers/create_records_matcher.rb, line 107
def count_str(klass, count)
  "#{count} #{klass.name.pluralize(count)}"
end
format_attributes_hash(attributes) click to toggle source
# File lib/active_record_block_matchers/create_a_new_matcher.rb, line 74
def format_attributes_hash(attributes)
  attributes.each_with_object({}) do |(field,value), memo|
    memo[field] = is_composable_matcher?(value) ? value.description : value
  end
end
is_composable_matcher?(value) click to toggle source
# File lib/active_record_block_matchers/create_a_new_matcher.rb, line 70
def is_composable_matcher?(value)
  value.respond_to?(:failure_message_when_negated)
end