Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eins78/rspec-render-docs
render readable docs from `rspec` examples
https://github.com/eins78/rspec-render-docs
Last synced: 8 days ago
JSON representation
render readable docs from `rspec` examples
- Host: GitHub
- URL: https://github.com/eins78/rspec-render-docs
- Owner: eins78
- License: mit
- Created: 2016-09-28T17:18:33.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-20T20:09:07.000Z (over 7 years ago)
- Last Synced: 2024-12-17T01:29:57.436Z (12 days ago)
- Language: JavaScript
- Homepage: https://npm.im/@eins78/rspec-render-docs
- Size: 224 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rspec-render-docs
render readable docs from `rspec` JSON output
⚠️ working, but experimental prototype
## TODO
dist-script/publishing so that /bin script works
## usage
currently requires a custom `rspec` spec formatter,
as more data is needed than in the built-in one.rspec has to be instructed to use it,
which can be done using the CLI (no config changes).when this package is installed, a few commands
are installed: `rspec-to-json` (wraps `rspec` to output data),
`rspec-render-docs` (renders docs from data)
and `rspec-to-docs` (does both).examples:
```sh
# when installed globally:
rspec-to-docs spec/features > features.html# using local package:
./node_modules/.bin/rspec-to-docs spec/features > features.html# custom usage
bundle exec rspec --dry-run --order defined \
--require "./node_modules/@eins78/rspec-render-docs/rspec/json_formatter_with_more_info.rb" \
--format JsonFormatterWithMoreInfo \
spec/features > features.json
./node_modules/.bin/rspec-to-docs features.json > features.html
# or pipe it: cat features.json | rspec-docs > features.html
```# license
MIT