diff --git a/src/test_utils.rs b/src/test_utils.rs index f73b782..2dfbe94 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -8,6 +8,7 @@ use tempfile::{tempdir, TempDir}; use crate::{ errors::Error, + file::{FileAppendLineFn, FileOpenFn}, network::{NetworkDownloadAsMp3Fn, NetworkFetchAsBytesFn, NetworkFetchAsTextFn}, prelude::*, }; @@ -45,3 +46,9 @@ pub fn stub_fetch_as_bytes() -> NetworkFetchAsBytesFn { pub fn stub_download_as_mp3() -> NetworkDownloadAsMp3Fn { Box::new(|_url: &str| Err(Error::message("Not implemented"))) } +pub fn stub_file_open() -> FileOpenFn { + Box::new(|_path: &str| Err(Error::message("Not implemented"))) +} +pub fn stub_file_append_line() -> FileAppendLineFn { + Box::new(|_: &str, _: &str| Err(Error::message("Not implemented"))) +}