I am using Capybara and Minitest for testing a rails 4 app. I have test lines like these that do work:
page.body.must_match(/word/)
page.body.must_match(/word2/)
but this does NOT work:
page.body.must_match(/(word).*(word2)/)
If I paste that regex into something like Regexr.com and regex101.com, that regex works perfectly against the page text being tested.
So is there some constraints as to what Regex is supported with Rails4/minitest? I really just want to confirm that word2 comes after word in the text. If this can't be done with regex is there a better way to do that in minitest?