mry 0.7.1

A simple but powerful mocking library that supports struct, trait, and function.
Documentation
#[mry::mry]
#[derive(Default, PartialEq)]
struct Cat {
    name: String,
}

#[derive(Debug, Clone, PartialEq)]
struct A<T>(T);

#[mry::mry]
impl Cat {
    fn meow(&self, mut string: String) -> String {
        string = self.name.to_string();
        string
    }
}

#[test]
fn meow_returns_with() {
    let mut cat: Cat = Cat {
        name: "Tama".into(),
        ..Default::default()
    };
    cat.mock_meow("aaa".to_string())
        .returns_with(|string| format!("Called with {}", string));

    assert_eq!(cat.meow("aaa".to_string()), "Called with aaa".to_string());
}