class Sus::Have::Key
def call(assertions, subject)
def call(assertions, subject) # We want to group all the assertions in to a distinct group: assertions.nested(self, distinct: true) do |assertions| assertions.assert(subject.key?(@name), "has key") if @predicate Expect.new(assertions, subject[@name]).to(@predicate) end end end