title: Test that a substring is present in array of strings in rspec
body: <pre><code>json[:errors] = ["Username can't be blank", "Email can't be blank"]
  </code></pre>
  
  <p>The error, in en.yml, itself is provided as:</p>
  
  <pre><code>username: "can't be blank",
  email: "can't be blank"
  </code></pre>
  
  <p>and the test:</p>
  
  <pre><code>expect(json[:errors]).to include t('activerecord.errors.messages.email')
  </code></pre>
  
  <p>Which fails because it's looking at the string "Email can't be blank", and "can't be blank" doesn't match it.</p>
  
  <p>My question is what is the best (and by that I mean best practice) way to test
  that the substring is included in a string contained inside the array json[:errors]</p>