Sha256: fdbce7e16a5e6f498d2b9d61284aeda2c4c487f8f558db5479c4f105162be63f
Contents?: true
Size: 620 Bytes
Versions: 1
Compression:
Stored size: 620 Bytes
Contents
module Pact class Error < ::StandardError end class InvalidMessageError < Error end # Raised when the interaction is not defined correctly class InvalidInteractionError < Error def initialize(interaction) super(build_message(interaction)) end private def build_message(interaction) missing_attributes = [] missing_attributes << :description unless interaction.description missing_attributes << :request unless interaction.request missing_attributes << :response unless interaction.response "Missing attributes: #{missing_attributes}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pact-support-1.3.0.alpha.1 | lib/pact/errors.rb |