ShellSpec Extension: Invocation
1.4K
A ShellSpec extension for capturing mock invocations.
This extension enables bash-based ShellSpec tests to capture mock invocations and to verify expectations about these invocations.
Describe 'capture_invocation in a simple mock'
It 'captures an invocation and its arguments'
Mock git
capture_invocation git "$@"
End
When run git commit "-m" "Initial commit"
The number of mocks should equal 1
The first mock should have received arguments git commit "-m" "Initial commit"
End
End
docker run --rm -t -v ".:/src" mgrafl/shellspec-ext-invocation
mgrafl/shellspec-ext-invocation on GitHub.
This project is licensed under the MIT license.
Content type
Image
Digest
sha256:3ad2f4709…
Size
98.6 MB
Last updated
about 2 years ago
docker pull mgrafl/shellspec-ext-invocation