Skip to content

Commit d710f2f

Browse files
committed
Small test refactor
1 parent 4d514b8 commit d710f2f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/lib.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ mod test {
1919

2020
#[test]
2121
fn test_parse_systemd_str() {
22-
let mut dir = current_dir().unwrap();
23-
dir.push("unit_files");
24-
dir.push("cardano-node.service");
22+
let dir = current_dir().unwrap().join("unit_files/cardano-node.service");
2523
let filepath = dir.to_str().unwrap();
2624
if let Ok(p) = parse(filepath) {
2725
let unit = p.get(&String::from("Unit")).unwrap();
@@ -102,9 +100,7 @@ mod test {
102100

103101
#[test]
104102
fn test_parse_systemd_list() {
105-
let mut dir = current_dir().unwrap();
106-
dir.push("unit_files");
107-
dir.push("cardano-node.service");
103+
let dir = current_dir().unwrap().join("unit_files/cardano-node.service");
108104
let filepath = dir.to_str().unwrap();
109105
if let Ok(p) = parse(filepath) {
110106
let section = p.get(&String::from("Service")).unwrap();

0 commit comments

Comments
 (0)