def url_to_be(url):
    """An expectation for checking the current url.
    url is the expected url, which must be an exact match
    returns True if the url matches, false otherwise."""
    def _predicate(driver):
        return url == driver.current_url

    return _predicate