Skip to content

Commit 049a85a

Browse files
committed
Remove test directory after test
1 parent ed2b130 commit 049a85a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/build_doc.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,18 @@ pub fn source_path(pkg: &Package) -> Option<&Path> {
111111
#[cfg(test)]
112112
mod test {
113113
use std::path::Path;
114+
use std::fs::remove_dir_all;
114115
use super::*;
115116

116117
#[test]
117118
#[ignore]
118119
fn test_build_doc() {
119-
// FIXME: Need to remove directory after we are finished
120120
let doc = build_doc("rand", None, None);
121121
assert!(doc.is_ok());
122122

123+
let doc = doc.unwrap();
124+
remove_dir_all(format!("{}-{}", doc.manifest().name(), doc.manifest().version())).unwrap();
125+
123126
let doc = build_doc("SOMECRATEWICHWILLBENVEREXISTS", None, None);
124127
assert!(doc.is_err());
125128
}

0 commit comments

Comments
 (0)