We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For instance, tokio::time::delay_for.
tokio::time::delay_for
The text was updated successfully, but these errors were encountered:
Sure. You can use automock like this:
automock
#[cfg(test)] #[automock] mod time { fn delay_for(); } #[cfg(test)] use mock_time as time; #[cfg(not(test))] use time;
Sorry, something went wrong.
I'm going to close this issue, because I think you're satisfied by that answer. But BTW, the [#double] attribute might help you, too. https://docs.rs/mockall_double/0.1.0/mockall_double/attr.double.html
[#double]
#[cfg(test)] #[automock] mod time { fn delay_for(); }
should be
fn delay_for() {}
else
error: custom attribute panicked = help: message: Unsupported item.
No branches or pull requests
For instance,
tokio::time::delay_for
.The text was updated successfully, but these errors were encountered: