UserDocs

UserDocs is an semi-autonomous way to create end-user documentation for your Rails project.

Installation

  1. Ensure you have the VERSION constant defined for your project.
  2. Add this line to your application's Gemfile: gem 'user_docs'
  3. And then execute: bundle
  4. Create procedures, for example: /docs/feature_two_procedure.rb

    #!ruby
    require_relative '../test/application_system_test_case.rb'
    
    class FeatureOneProcedure < ApplicationSystemTestCase
      include UserDocs
    
      test 'action one' do
        visit '/'
        accept_alert
        comment 'Hotel'
      end
    end
    
  5. Generate documentation by running your system tests: rails user_docs:build_site

  6. Documentation viewable at /docs

Usage

Here are the following methods you can use to create documentation:

  • accept_alert
  • click_on
  • fill_in
  • choose
  • save_screenshot
  • comment

License

The gem is available as open source under the terms of the MIT License.