title: What is the best way to test array of hashes with RSpec?
body: <p>I'm trying to test array of hashes with RSpec, but I don't know how to test them because the hash order could change. E.G:</p>
  
  <pre><code>[{name: 'John', age: 40, country: {abrev: 'US', name: 'United States'}}, {name: 'Peter', age: 43, country: {abrev: 'US', name: 'United States'}}]
  </code></pre>
  
  <p>is the same as:</p>
  
  <pre><code>[{name: 'Peter', age: 43, country: {abrev: 'US', name: 'United States'}}, {name: 'John', age: 40, country: {abrev: 'US', name: 'United States'}}]
  </code></pre>
  
  <p>What is the best way to test them using RSpec? Should I use a custom matcher?</p>