pub struct Expect(/* private fields */);Expand description
Specify what you expect to see after the test concluded.
See TempTestEnv::run.
Implementations§
Source§impl Expect
impl Expect
Sourcepub fn expect_dir<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
pub fn expect_dir<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
Ensure a directory exists after a test ran.
Sourcepub fn expect_file<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
pub fn expect_file<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
Ensure a file exists after a test ran.
Sourcepub fn expect_file_content<P: AsRef<Path>>(
&mut self,
path: P,
content: impl AsRef<[u8]>,
) -> &mut Self
pub fn expect_file_content<P: AsRef<Path>>( &mut self, path: P, content: impl AsRef<[u8]>, ) -> &mut Self
Ensure a file with the given content exists after a test ran.
Sourcepub fn expect_file_empty<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
pub fn expect_file_empty<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
Ensure an empty file exists after a test ran.
Auto Trait Implementations§
impl Freeze for Expect
impl RefUnwindSafe for Expect
impl Send for Expect
impl Sync for Expect
impl Unpin for Expect
impl UnwindSafe for Expect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more