Adds support for passing functions to `assert`

cc @rwjblue