summaryrefslogtreecommitdiffstats
path: root/src/testutils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/testutils.rs')
-rw-r--r--src/testutils.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/testutils.rs b/src/testutils.rs
index 82eea33..0b1da83 100644
--- a/src/testutils.rs
+++ b/src/testutils.rs
@@ -4,25 +4,10 @@ use assert_fs::fixture::{ChildPath, FixtureError};
use std::path::{PathBuf,Path};
use std::fs;
-use crate::defaults;
-
pub fn path_to(artifact: &str) -> PathBuf {
[env!("CARGO_MANIFEST_DIR"), "testdata", artifact].iter().collect()
}
-pub fn prepare_testdir_empty() -> TempDir {
- let testdir = TempDir::new().unwrap();
- fs::create_dir(testdir.child(".khaleesi").path()).unwrap();
- defaults::set_khaleesi_dir(testdir.path());
- testdir
-}
-
-pub fn prepare_testdir(template: &str) -> TempDir {
- let testdir = prepare_testdir_empty();
- testdir.child(".khaleesi/").copy_from(path_to(template), &["*"]).unwrap();
- testdir
-}
-
pub fn touch_testfile(testdir: &TempDir, relative_path: &Path) -> Result<ChildPath, FixtureError> {
let testfile = testdir.child(relative_path);
testfile.touch()?;