Since strings is an array of strings of the generated text, if one wants to test for a longer string or a sentence, you need to join the values from strings.
doing it like:
{ expect(PDF::Inspector::Text.analyze( my_pdf ).strings.join(" ").to include "Object 10" }
...should give you what you need.