https://github.com/electronvector/fff-auto
For automatically generating mocks with the Fake Function Framework (fff)
https://github.com/electronvector/fff-auto
Last synced: 12 months ago
JSON representation
For automatically generating mocks with the Fake Function Framework (fff)
- Host: GitHub
- URL: https://github.com/electronvector/fff-auto
- Owner: ElectronVector
- License: mit
- Created: 2016-04-06T05:57:33.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-06T14:54:51.000Z (almost 10 years ago)
- Last Synced: 2025-01-09T15:56:39.464Z (about 1 year ago)
- Language: Ruby
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FFF Automatic Mock Generation
This can be used to mock C header files with the [Fake Function Framework](https://github.com/meekrosoft/fff) (fff).
Usage:
```
ruby fff.rb header.h [OUTPUT_DIR]
```
This will create a mock_header.h file in the provided output directory. If no OUTPUT_DIR is provided, then it will just be created here.
The mock header file can be included in your tests instead of the real module defined in the original header file.
## Testing
Run the tests with:
```
rspec spec/fff_generator_spec.rb
```
## Implementation
This uses the C header file parser used by [CMock](https://github.com/ThrowTheSwitch/CMock).
## To Do
- Add support for `const` arguments.