natritmeyer/site_prism — pull request #96 by jmileham (2014-12-15 22:35:16+00:00)
Title: Expose url matches

Hi @natritmeyer, as threatened, here's a follow-on PR that allows siteprism users to easily verify templated URL values via a parameterized `#displayed?` method for simple use cases and `#url_matches` for more complex tests. The README update describes the features in pretty good detail, and the tests should be revealing.

We've gotten good mileage out of it at Betterment when we want to validate that a certain object ID or query string parameter is in place, and it keeps our SitePrism code 100% regexp-free. Again no backwards compatibility loss, and in the name of not violating POLA, `#url_matches` does something sensible even if you use Regexp-style matchers - it returns the `MatchData` object.