{"id":24756901,"url":"https://github.com/fmierlo/mockdown","last_synced_at":"2026-03-07T18:01:47.263Z","repository":{"id":273537995,"uuid":"920046765","full_name":"fmierlo/mockdown","owner":"fmierlo","description":"Mockdown is a single file and macro/dependency free mock library for Rust","archived":false,"fork":false,"pushed_at":"2025-05-24T23:54:19.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T03:31:47.575Z","etag":null,"topics":["mock","mockdown","mocking","rust","test","testing"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/mockdown","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/fmierlo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-21T13:25:04.000Z","updated_at":"2025-05-24T23:54:23.000Z","dependencies_parsed_at":"2025-01-21T14:30:57.599Z","dependency_job_id":"d00c613d-409c-4fb0-801b-4c78ca138c78","html_url":"https://github.com/fmierlo/mockdown","commit_stats":null,"previous_names":["fmierlo/mockdown"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/fmierlo/mockdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmierlo%2Fmockdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmierlo%2Fmockdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmierlo%2Fmockdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmierlo%2Fmockdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fmierlo","download_url":"https://codeload.github.com/fmierlo/mockdown/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmierlo%2Fmockdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30225411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T17:00:40.062Z","status":"ssl_error","status_checked_at":"2026-03-07T17:00:39.026Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","mockdown","mocking","rust","test","testing"],"created_at":"2025-01-28T14:21:18.746Z","updated_at":"2026-03-07T18:01:47.229Z","avatar_url":"https://github.com/fmierlo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mockdown \u0026emsp; [![latest]][crates.io] [![msrv]][crates.io] [![docs.rs]][docs.rs/mockdown] ![][build]\n\nMockdown is a single file and macro/dependency free mock library for Rust.\n\n# Example\n\n```rust\npub mod math {\n    pub fn add(x: i32, y: i32) -\u003e i32 {\n        x + y\n    }\n}\n\npub mod plus {\n    #[cfg(not(test))]\n    use super::math;\n\n    #[cfg(test)]\n    use mocks::math;\n\n    pub fn one(x: i32) -\u003e i32 {\n        math::add(x, 1)\n    }\n\n    #[cfg(test)]\n    pub mod mocks {\n        pub mod math {\n            use mockdown::{mockdown, Mock};\n\n            pub struct Add(pub fn(x: i32, y: i32) -\u003e i32);\n\n            pub fn add(x: i32, y: i32) -\u003e i32 {\n                mockdown().next(|Add(mock)| mock(x, y)).unwrap()\n            }\n        }\n    }\n\n    #[cfg(test)]\n    pub mod tests {\n        use super::mocks::math;\n        use mockdown::{mockdown, Mock};\n\n        #[test]\n        pub fn test_one() {\n            mockdown().expect(math::Add(|x, y| {\n                assert_eq!((1, 1), (x, y));\n                2\n            }));\n\n            let z = super::one(1);\n            assert_eq!(z, 2);\n        }\n    }\n}\n```\n\n[latest]: https://img.shields.io/crates/v/mockdown.svg\n[crates.io]: https://crates.io/crates/mockdown\n[msrv]: https://img.shields.io/crates/msrv/mockdown\n[docs.rs]: https://img.shields.io/docsrs/mockdown?label=docs.rs\n[docs.rs/mockdown]: https://docs.rs/mockdown/\n[build]: https://github.com/fmierlo/mockdown/workflows/test/badge.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmierlo%2Fmockdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffmierlo%2Fmockdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmierlo%2Fmockdown/lists"}