Initialize a repository in a temp dir. Returns the guard, repo, and root.
()
| 655 | |
| 656 | /// Initialize a repository in a temp dir. Returns the guard, repo, and root. |
| 657 | fn test_repo() -> (TempDir, Repository, PathBuf) { |
| 658 | let dir = TempDir::new().expect("create tempdir"); |
| 659 | let root = dir.path().to_path_buf(); |
| 660 | let repo = Repository::init(&root).expect("init repository"); |
| 661 | (dir, repo, root) |
| 662 | } |
| 663 | |
| 664 | #[test] |
| 665 | fn test_restore_modified_restores_pristine_content() { |
no test coverage detected