class RubyEventStore::RSpec::Matchers::ListPhraser
def all_but_last
def all_but_last (0...-1) end
def call(object)
def call(object) items = Array(object).compact.map { |o| format(o) } return "" if items.empty? items.one? ? items.join : "#{items[all_but_last].join(", ")} and #{items.fetch(-1)}" end
def format(object)
def format(object) object.respond_to?(:description) ? ::RSpec::Support::ObjectFormatter.format(object) : "be a #{object}" end