From cc5992f70050d18175afe91584c5425e12ed15cd Mon Sep 17 00:00:00 2001 From: Gonzalo Bulnes Guilpain Date: Wed, 19 Feb 2014 02:05:59 -0300 Subject: [PATCH] Add executable documentation entry in README Add Rake task to generate doc/features.html --- README.md | 11 +++++++++++ Rakefile | 4 ++++ doc/.gitkeep | 0 3 files changed, 15 insertions(+) create mode 100644 doc/.gitkeep diff --git a/README.md b/README.md index af402242..72808c11 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,17 @@ The resulting Cucumber features are a bit verbose, and their output when errors You can run the full test suite with `cd simple_token_authentication && rake`. +### Executable documentation + +The Cucumber scenarii describe how to setup demonstration applications for different use cases. While you can read the `rake` output, you may prefer to read it in HTML format: + +```bash +cd simple_token_authentication +rake features_html # generate the features documentation + +# Open doc/features.html in your preferred web browser. +``` + ### Contributions Contributions are welcome! I'm not keeping a list of contributors for now, but any PR which references us all will be welcome. diff --git a/Rakefile b/Rakefile index 9e81db43..b575d47c 100644 --- a/Rakefile +++ b/Rakefile @@ -26,6 +26,10 @@ begin t.cucumber_opts = "--format pretty" end + Cucumber::Rake::Task.new(:features_html) do |t| + t.cucumber_opts = "--format html --out doc/features.html" + end + rescue LoadError desc 'Cucumber rake task not available' task :features do diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 00000000..e69de29b