0

When following the instructions for setting up aptitome with rspec_api_documentation, I receive the following error:

uninitialized constant RspecApiDocumentation

How do I fix this?

Obromios
  • 15,408
  • 15
  • 72
  • 127

1 Answers1

1

I solved it by removing the configuration from spec_helper.rb and setting up an initializer as per this blog, i.e.

# config/initializers/rspec_api_documentation.rb
RspecApiDocumentation.configure do |config|
  # Output folder
  config.docs_dir = Rails.root.join("doc", "api")

  # An array of output format(s).
  # Possible values are :json, :html, :combined_text, :combined_json,
  #   :json_iodocs, :textile, :markdown, :append_json
  config.format = [:json]
end
Obromios
  • 15,408
  • 15
  • 72
  • 127