Assumptions based on experience with pacts so for:
- The most common type of matching that is useful is asserting that:
- The expected keys are present
- The values at the actual keys are of the same class (string/number/nil) as the expected values
- Occasionally we'll want a literal match
- Occasionally we'll want a regular expresssion
- Extra keys in a hash are OK for responses but not for requests (following the "be strict with what you send out, be lax with what you accept" principle)
- Extra items in an array are debatable (extra keys in a hash are generally ignored, however, all items in an array are generally processed, so allowing "unverified" extras to sneak in could be a bad thing. Working out what to do with "extras" is not immediately obvious to me however.)