diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 802c364..6349652 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -78,3 +78,23 @@ macro_rules! assert_or_err { } pub use assert_or_err; + +#[macro_export] +macro_rules! fixture { + ($fixture:expr => | $($arg:ident),* | $body:expr) => { + #[allow(unused_parens)] + $fixture + .with(|($($arg),*)| { + $( + let $arg = $arg.clone(); + )* + + async move { + $body + } + }) + .await; + }; +} + +pub use fixture;