Assertions
Command run assertions
Use these after running a command with run
.
Function Name | Description |
assert_failure | Asserts that a command fails |
assert_output | Asserts that a command outputs an exact string |
assert_output_contains | Checks if output contains a specific string |
assert_output_not_contains | Checks if output does not contain a specific string |
assert_success | Asserts that a command succeeds |
String assertions
Function Name | Description |
assert_empty | Asserts that a string is empty |
assert_equal | Asserts that two string are equal |
assert_contains | Asserts that a string contains a given substring |
assert_not_contains | Asserts that a string does not contain a substring |
File assertions
Function Name | Description |
assert_binary_files_equal | Checks if two binary files are equal |
assert_binary_files_not_equal | Checks if two binary files are not equal |
assert_dir_contains_string | Checks if directory contains a specific string |
assert_dir_empty | Asserts that a directory is empty |
assert_dir_exists | Asserts that a directory exists |
assert_dir_not_contains_string | Checks if directory does not contain a specific string |
assert_dir_not_empty | Asserts that a directory is not empty |
assert_dir_not_exists | Asserts that a directory does not exist |
assert_dirs_equal | Asserts that two directories are equal |
assert_file_contains | Checks if a file contains a specific string |
assert_file_exists | Asserts that a file exists |
assert_file_mode | Checks the file permission mode |
assert_file_not_contains | Checks if a file does not contain a specific string |
assert_file_not_exists | Asserts that a file does not exist |
assert_files_equal | Asserts that two files are equal |
assert_files_not_equal | Asserts that two files are not equal |
assert_symlink_exists | Asserts that a symbolic link exists |
assert_symlink_not_exists | Asserts that a symbolic link does not exist |
Git assertions
Function Name | Description |
assert_git_clean | Asserts that a git repository is clean |
assert_git_file_is_not_tracked | Checks if a file is not tracked in git |
assert_git_file_is_tracked | Checks if a file is tracked in git |
assert_git_not_clean | Asserts that a git repository is not clean |
assert_git_repo | Asserts that a directory is a git repository |