summaryrefslogtreecommitdiff
path: root/test_util/src/fs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'test_util/src/fs.rs')
-rw-r--r--test_util/src/fs.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/test_util/src/fs.rs b/test_util/src/fs.rs
index 005c467a6..57ab8ee10 100644
--- a/test_util/src/fs.rs
+++ b/test_util/src/fs.rs
@@ -116,6 +116,10 @@ impl PathRef {
serde_json::from_str(&self.read_to_string()).unwrap()
}
+ pub fn read_json_value(&self) -> serde_json::Value {
+ serde_json::from_str(&self.read_to_string()).unwrap()
+ }
+
pub fn rename(&self, to: impl AsRef<Path>) {
fs::rename(self, self.join(to)).unwrap();
}