Trait zebra_test::command::TestDirExt

source ·
pub trait TestDirExt
where Self: AsRef<Path> + Sized,
{ // Required method fn spawn_child_with_command( self, cmd: &str, args: Arguments, ) -> Result<TestChild<Self>>; }
Expand description

Extension trait for methods on tempdir::TempDir for using it as a test directory with an arbitrary command.

This trait is separate from ZebradTestDirExt, so that we can test zebra_test::command without running zebrad.

Required Methods§

source

fn spawn_child_with_command( self, cmd: &str, args: Arguments, ) -> Result<TestChild<Self>>

Spawn cmd with args as a child process in this test directory, potentially taking ownership of the tempdir for the duration of the child process.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> TestDirExt for T
where Self: AsRef<Path> + Sized,