-
- Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
fake function
fake <command> [replacement code] Fakes command and replaces it with replacement code (if code is specified) for the rest of the execution of your test. If no replacement code is specified, then it replaces command by one that echoes stdin of fake. This may be useful if you need to simulate an environment for you code under test.
Example
https://github.com/pgrange/bash_unit
For instance examples:
fake ps echo hello world ps will output:
hello world We can do the same using stdin of fake:
fake ps << EOF hello world EOF ps hello world It has been asked whether using fake results in creating actual fakes or stubs or mocks? or may be spies? or may be they are dummies? The first answer to this question is: it depends. The second is: read this great and detailed literature on this subject.
ChemaclassChemaclass
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request