MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / fixture

Function fixture

libatomic/tests/change_intent_context_test.rs:22–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 .unwrap()
21}
22fn fixture() -> (tempfile::TempDir, Repository) {
23 let dir = tempfile::tempdir().unwrap();
24 let repo = Repository::init(dir.path()).unwrap();
25 repo.init_vault().unwrap();
26 (dir, repo)
27}
28fn save(repo: &Repository, message: &str) -> Hash {
29 repo.save_change(&Change::empty(ChangeHeader::new(message)))
30 .unwrap()

Calls 4

initFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45
init_vaultMethod · 0.45

Tested by

no test coverage detected