diff --git a/src/library/beets/mod.rs b/src/library/beets/mod.rs index b17b6cb..5a19559 100644 --- a/src/library/beets/mod.rs +++ b/src/library/beets/mod.rs @@ -173,7 +173,7 @@ impl ILibraryPrivate for BeetsLibrary { mod tests { use mockall::predicate; - use crate::library::testlib::{BEETS_OUTPUT, LIBRARY_ITEMS}; + use crate::library::testlib::{LIBRARY_BEETS, LIBRARY_ITEMS}; use super::*; @@ -247,7 +247,7 @@ mod tests { fn test_list() { let arguments = vec!["ls".to_string(), LIST_FORMAT_ARG.to_string()]; let expected: &Vec = LIBRARY_ITEMS.as_ref(); - let result = Ok(BEETS_OUTPUT.to_owned()); + let result = Ok(LIBRARY_BEETS.to_owned()); let mut executor = MockIBeetsLibraryExecutor::new(); executor @@ -300,7 +300,7 @@ mod tests { #[test] fn invalid_data_split() { let arguments = vec!["ls".to_string(), LIST_FORMAT_ARG.to_string()]; - let mut output: Vec = BEETS_OUTPUT.to_owned(); + let mut output: Vec = LIBRARY_BEETS.to_owned(); let invalid_string = output[2] .split(LIST_FORMAT_SEPARATOR) .map(|s| s.to_owned()) @@ -325,7 +325,7 @@ mod tests { #[test] fn invalid_data_format() { let arguments = vec!["ls".to_string(), LIST_FORMAT_ARG.to_string()]; - let mut output: Vec = BEETS_OUTPUT.to_owned(); + let mut output: Vec = LIBRARY_BEETS.to_owned(); let mut invalid_string = output[2] .split(LIST_FORMAT_SEPARATOR) .map(|s| s.to_owned()) diff --git a/src/library/testlib.rs b/src/library/testlib.rs index 15d4ac0..6bb4ed3 100644 --- a/src/library/testlib.rs +++ b/src/library/testlib.rs @@ -3,7 +3,7 @@ use once_cell::sync::Lazy; use crate::library::Item; use crate::Format; -macro_rules! beets_output { +macro_rules! library_beets { () => { vec![ String::from("album_artist a -*^- -*^- 1998 -*^- album_title a.a -*^- 1 -*^- track a.a.1 -*^- artist a.a.1 -*^- FLAC -*^- 992"), @@ -188,5 +188,5 @@ macro_rules! library_items { }; } -pub static BEETS_OUTPUT: Lazy> = Lazy::new(|| beets_output!()); +pub static LIBRARY_BEETS: Lazy> = Lazy::new(|| library_beets!()); pub static LIBRARY_ITEMS: Lazy> = Lazy::new(|| library_items!());