| 35 | |
| 36 | impl Fixtures { |
| 37 | fn blank(fixture_dirname: &str) -> Self { |
| 38 | let root = &env::var("CARGO_MANIFEST_DIR").expect("$CARGO_MANIFEST_DIR"); |
| 39 | let mut source = PathBuf::from(root); |
| 40 | source.push("tests/fixtures"); |
| 41 | source.push(fixture_dirname); |
| 42 | |
| 43 | let tempdir = tempfile::tempdir().unwrap(); |
| 44 | let path = PathBuf::from(&tempdir.path()); |
| 45 | let root = DataRoot::new(path.clone()); |
| 46 | let git = Client::new(actor(), &root, Timespec); |
| 47 | |
| 48 | Fixtures { |
| 49 | _tempdir: tempdir, |
| 50 | git, |
| 51 | path, |
| 52 | source, |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | pub fn mutation(&self) -> Mutation { |
| 57 | self.git.mutation(IndexMode::Update).unwrap() |