2021-01-29 16:05:22 +01:00
|
|
|
:source-highlighter: highlightjs
|
|
|
|
|
|
|
|
rspec-tools: Tools automating RSPEC workflows
|
|
|
|
=============================================
|
|
|
|
|
|
|
|
Install
|
|
|
|
-------
|
|
|
|
|
|
|
|
.Install Pipenv
|
|
|
|
[source,shell]
|
|
|
|
----
|
|
|
|
# macos
|
|
|
|
$ brew install pipenv
|
|
|
|
----
|
|
|
|
|
|
|
|
.Install rspec-tools
|
|
|
|
[source,shell]
|
|
|
|
----
|
|
|
|
$ cd rspec-tools
|
|
|
|
$ pipenv install -e .
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
|
|
|
.See all commands
|
|
|
|
[source,sh]
|
|
|
|
----
|
2023-10-30 10:33:56 +01:00
|
|
|
$ pipenv run rspec-tools --help
|
2021-01-29 16:05:22 +01:00
|
|
|
----
|
|
|
|
|
|
|
|
|
|
|
|
Development
|
|
|
|
-----------
|
|
|
|
|
|
|
|
.Install dev dependencies
|
|
|
|
|
|
|
|
[source,sh]
|
|
|
|
----
|
|
|
|
$ pipenv install --dev -e .
|
|
|
|
----
|
|
|
|
|
|
|
|
.Run tests
|
|
|
|
[source,sh]
|
|
|
|
----
|
2023-10-30 10:33:56 +01:00
|
|
|
$ pipenv run pytest
|
2023-03-07 17:16:47 +01:00
|
|
|
----
|
|
|
|
|
|
|
|
.Fixtures
|
|
|
|
|
|
|
|
When writing a new test, create a fixture rule in `tests/resources/{invalid_rules, rules}`.
|
|
|
|
|
|
|
|
In order to generate an HTML file from the ASCIIdoc, you can use [asciidoctor](https://docs.asciidoctor.org/) as follows:
|
|
|
|
|
|
|
|
[source,sh]
|
|
|
|
----
|
|
|
|
$ asciidoctor -e rule.adoc
|
|
|
|
----
|