pub struct TestHelper { /* private fields */ }Implementations§
Source§impl TestHelper
impl TestHelper
pub fn new() -> Result<Self>
pub fn with_precious_root_in_subdir<P: AsRef<Path>>(self, subdir: P) -> Self
pub fn with_git_repo(self) -> Result<Self>
pub fn with_config_file(self, file_name: &str, content: &str) -> Result<Self>
pub fn pushd_to_git_root(&self) -> Result<Pushd>
pub fn pushd_to_subdir(&self) -> Result<Pushd>
pub fn git_root(&self) -> PathBuf
pub fn precious_root(&self) -> PathBuf
pub fn config_file(&self, file_name: &str) -> PathBuf
pub fn all_files(&self) -> Vec<PathBuf>
pub fn all_files1(&self) -> Vec1<PathBuf>
pub fn stage_all(&self) -> Result<()>
pub fn stage_some(&self, files: &[&Path]) -> Result<()>
pub fn commit_all(&self) -> Result<()>
pub fn non_ignored_files() -> Vec<PathBuf>
pub fn switch_to_branch(&self, branch: &str, exists: bool) -> Result<()>
pub fn merge_master(&self, expect_fail: bool) -> Result<()>
pub fn add_gitignore_files(&self) -> Result<Vec<PathBuf>>
pub fn modify_files(&self) -> Result<Vec<PathBuf>>
pub fn write_file<P: AsRef<Path>>(&self, rel: P, content: &str) -> Result<()>
pub fn delete_file<P: AsRef<Path>>(&self, rel: P) -> Result<()>
pub fn read_file(&self, rel: &Path) -> Result<String>
Auto Trait Implementations§
impl Freeze for TestHelper
impl RefUnwindSafe for TestHelper
impl Send for TestHelper
impl Sync for TestHelper
impl Unpin for TestHelper
impl UnwindSafe for TestHelper
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more