The project is in a healthy, maintained state
Generates documentation from RSpec code blocks in Markdown files.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.4
~> 0.1.3
~> 4.1
~> 3.12
~> 1.15
 Project Readme

RSpec::Documentation

RSpec Documentation provides a simple but powerful system for generating Ruby documentation using RSpec designed to help you ensure that all code examples in your documentation really work.

  • Create a tree of Markdown files in your project directory under rspec-documentation/pages/.
  • Embed tests in ```rspec code blocks (other output formatters are available - see examples).
  • Define a subject for each test.
  • Run the provided rspec-documentation command.

There is no DSL to learn and vanilla RSpec examples are used to generate inputs and outputs. No Markdown language extensions are used, simply define the language of a fenced code block as rspec in any .md file and RSpecDocumentation will do the rest.

Quick Example

The following is an example Markdown file.

# An example test

This is a very simple test:

```rspec
subject { 'my subject' }
it { is_expected.to eql 'my subject' }
```

Documentation

View the full documentation (built using Rspec Documentation!) for detailed usage instructions.