Copy the test project from a fixed state
(template_path: impl AsRef<std::path::Path>)
| 51 | impl Project { |
| 52 | /// Copy the test project from a fixed state |
| 53 | pub fn from_template(template_path: impl AsRef<std::path::Path>) -> Self { |
| 54 | let root = paths::root(); |
| 55 | let project_root = root.join("case"); |
| 56 | snapbox::path::copy_template(template_path.as_ref(), &project_root).unwrap(); |
| 57 | Self { root: project_root } |
| 58 | } |
| 59 | |
| 60 | /// Root of the project, ex: `/path/to/cargo/target/cit/t0/foo` |
| 61 | pub fn root(&self) -> PathBuf { |