#![allow(unused)]
use assert_cmd::{Command, cargo::cargo_bin_cmd};
use slumber_core::collection::CollectionFile;
use slumber_util::{TempDir, temp_dir};
use std::{
env,
ops::Deref,
path::{Path, PathBuf},
};
pub fn slumber() -> (Command, TempDir) {
let data_dir = temp_dir();
let mut command = cargo_bin_cmd!("slumber_cli");
command
.current_dir(tests_dir())
.env("SLUMBER_DATA_DIRECTORY", data_dir.deref());
(command, data_dir)
}
pub fn tests_dir() -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR")).join("tests")
}
pub fn collection_file() -> CollectionFile {
CollectionFile::new(Some(tests_dir().join("slumber.yml"))).unwrap()
}