[−][src]Module bindle::testing
Some helpful utilities for testing. This module is only available if the test-tools
feature is
enabled. Its main feature is allowing the use of prebuilt scaffolds for testing.
See the README in
the testing directory of bindle for more information on scaffolding structure. All loading
functions will load scaffolds by default from $CARGO_MANIFEST_DIR/tests/scaffolds
. However,
this directory can be configured by setting the BINDLE_SCAFFOLD_DIR
environment variable to
your desired path. All functions will panic if they encounter an error to make it easier on
users (so they don't have to handle the errors in their tests in the exact same way)
Structs
RawScaffold | A scaffold loaded from disk, containing the raw bytes for all files in the bindle. Both
|
Scaffold | A scaffold loaded from disk, containing the bindle object representations for all files in the
bindle (except for the parcels themselves, as they can be binary data). Both |
Constants
SCAFFOLD_DIR_ENV | The environment variable name used for setting the scaffolds directory |
Functions
load_all_files | Loads all scaffolds in the scaffolds directory, returning them as a hashmap with the directory
name as the key and a |
setup | Returns a file |