|
@@ -108,6 +108,7 @@ You can find here the documentation for the main framework and the plugins we us
|
|
|
- [bats-assert](https://github.com/bats-core/bats-assert)
|
|
|
- [bats-support](https://github.com/bats-core/bats-support)
|
|
|
- [bats-file](https://github.com/bats-core/bats-file)
|
|
|
+ - [bats-mock](https://github.com/grayhemp/bats-mock)
|
|
|
|
|
|
> As it often happens with open source, the first results from search engines refer to the old, unmaintained forks.
|
|
|
> Be sure to use the links above to find the good versions.
|
|
@@ -310,6 +311,12 @@ We included the [bats-file](https://github.com/bats-core/bats-file) plugin to
|
|
|
check the result of file system operations: existence, type/size/ownership checks
|
|
|
on files, symlinks, directories, sockets.
|
|
|
|
|
|
+## mocking external commands
|
|
|
+
|
|
|
+The [bats-mock](https://github.com/grayhemp/bats-mock) plugin allows you to define
|
|
|
+a "fake" behavior for the external commands called by a package under test, and
|
|
|
+to record and assert which parameters are passed to it.
|
|
|
+
|
|
|
## gotchas
|
|
|
|
|
|
- pay attention to tests that are not run - for example "bats warning: Executed 143
|