blob: fb1bb7a711c0584dde2df404af4408627ed28f93 [file] [log] [blame]
// vim: tw=80
//! a method that returns impl Trait
#![deny(warnings)]
use mockall::*;
use std::fmt::Debug;
mock!{
Foo {
fn foo(&self) -> impl Debug + Send;
}
}
#[test]
fn returning() {
let mut mock = MockFoo::new();
mock.expect_foo().returning(|| Box::new(4));
format!("{:?}", mock.foo());
}