14 lines
320 B
Rust
14 lines
320 B
Rust
use tempfile::TempDir;
|
|
|
|
pub struct TestHome {
|
|
_dir: TempDir,
|
|
pub paths: geth_config::GethPaths,
|
|
}
|
|
|
|
impl TestHome {
|
|
pub fn new() -> std::io::Result<Self> {
|
|
let dir = tempfile::tempdir()?;
|
|
let paths = geth_config::GethPaths::from_home(dir.path());
|
|
Ok(Self { _dir: dir, paths })
|
|
}
|
|
}
|