tearup-0.1.0 has been yanked.
tearup
A macro test helper to help you to write integration tests.
Basically:
- execute a
fn setup()before your test - execute a
fn teardown()after the test end - with a wait and panic catch mechanisms.
Install
Add the following to your Cargo.toml
[dependencies]
tearup = "0.1"
Usage
Your test will look like this:
async
How to implements:
use async_trait;
use ;
// First define your context
// Second implement your setup/teardown
// Optionnaly define some setup accessor
// if you need to access something from your setup (like db connection, seed, etc)
;
// And write your tests !
async