class Pact::InvalidInteractionError

Raised when the interaction is not defined correctly

Public Class Methods

new(interaction) click to toggle source
Calls superclass method
# File lib/pact/errors.rb, line 7
def initialize(interaction)
  super(build_message(interaction))
end

Private Instance Methods

build_message(interaction) click to toggle source
# File lib/pact/errors.rb, line 13
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