{"id":13828780,"url":"https://github.com/mockiato/mockiato","last_synced_at":"2025-12-30T04:15:08.516Z","repository":{"id":45162621,"uuid":"146013346","full_name":"mockiato/mockiato","owner":"mockiato","description":"A strict, yet friendly mocking library for Rust 2018","archived":true,"fork":false,"pushed_at":"2024-05-31T08:53:53.000Z","size":1068,"stargazers_count":225,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-07T11:23:24.518Z","etag":null,"topics":["mock","mocking","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mockiato.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-24T16:12:26.000Z","updated_at":"2024-07-11T11:25:12.000Z","dependencies_parsed_at":"2022-08-27T19:51:47.361Z","dependency_job_id":null,"html_url":"https://github.com/mockiato/mockiato","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockiato%2Fmockiato","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockiato%2Fmockiato/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockiato%2Fmockiato/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockiato%2Fmockiato/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mockiato","download_url":"https://codeload.github.com/mockiato/mockiato/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225025287,"owners_count":17409016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mock","mocking","rust"],"created_at":"2024-08-04T09:03:08.661Z","updated_at":"2025-12-12T13:02:41.697Z","avatar_url":"https://github.com/mockiato.png","language":"Rust","funding_links":[],"categories":["Rust","Development tools"],"sub_categories":["Testing"],"readme":"# Mockiato\n\n\u003e [!WARNING]\n\u003e Mockiato is no longer maintained and thus the repository has been archived.\n\nA strict, yet friendly mocking library for Rust 2018\n\n## ⚠️ Disclaimer for working with stable rust\nMockiato relies on the unstable `proc_macro_diagnostics` API to print helpful messages\nand the unstable `specialization` feature to be able to print expected calls.\n\nMocks work as expected on stable rust, but diagnostics are very limited.  \nWe recommend re-running failing tests using nighly rust in order to pin-point the issue.\n\n## [Docs](https://docs.rs/mockiato)\n\n## Quickstart\n\n```rust\n#[cfg(test)]\nuse mockiato::mockable;\n\n#[cfg_attr(test, mockable)]\ntrait Greeter {\n    fn greet(\u0026self, name: \u0026str) -\u003e String;\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn greet_the_world() {\n        let mut greeter = GreeterMock::new();\n\n        greeter\n            .expect_greet(|arg| arg.partial_eq(\"world\"))\n            .times(1..2)\n            .returns(String::from(\"Hello world\"));\n\n        assert_eq!(\"Hello world\", greeter.greet(\"world\"));\n    }\n}\n```\n\n## Trait Bounds\n\nTrait bounds are currently not supported meaning that the supertraits will not be implemented for mocks.\n\nThe following traits are always implemented for mocks:\n\n- [Debug](https://doc.rust-lang.org/std/fmt/trait.Debug.html)  \n  Example: [`cargo run --example debug`](./examples/debug.rs)\n- [Clone](https://doc.rust-lang.org/std/clone/trait.Clone.html)  \n  Example: [`cargo test --example clone`](./examples/clone.rs)\n- [Default](https://doc.rust-lang.org/std/default/trait.Default.html)  \n  Example: [`cargo test --example default`](./examples/default.rs)\n\n## Downcasting\n\nAn example of how to use downcasting with mockiato can be found in the [`downcasting`](./examples/downcasting.rs) example.\n\n## Contributing\n\n### Enable debug impls in codegen\n\n```bash\ncargo test --features mockiato-codegen/debug-impls\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockiato%2Fmockiato","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmockiato%2Fmockiato","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockiato%2Fmockiato/lists"}