Skip to content
Matt edited this page Nov 17, 2013 · 4 revisions

When your Conveys have some set-up involved, you may need to tear down after or between tests. Use Reset() to clean up in those cases. A Convey's Reset() runs at the end of each Convey() within that same scope.

For example:

Convey("These Conveys will be reset after each execution by the reset function below", nil)

Convey("Another Convey in the same scope...", nil)

Reset(func() {
    db.Close()
})
Clone this wiki locally