Skip to content

output, and example scope issue. #18

@ChrisCPO

Description

@ChrisCPO

I must be missing something or/but the documentation is poor on this subject.

How do I actually create the output file? and where does it create it at?

cheers

UPDATE
ok I see it creates a folder ./api_docs in the app's root directory, I was using git status to check for file modifications. Why does this folder not show up in git? my .gitignore has not been modified.

UPDATE
til: git does not track empty folders.

Upon getting the gem to work in Sinatra app, I came across a few issues,
in my app I have a simple around(:each) hook

  config.around(:each) do |example|
    DB.transaction(:rollback=>:always, :auto_savepoint=>true) { example.run }
  end

which when used in conjunction with this gem was rasing the following error:

        `example` is not available from within an example (e.g. an `it` block) or from constructs that run in the scope of an example (e.g. `before`, `let`, etc). It is only available on an example group (e.g. a `describe` or `context` block).
     # ./spec/spec_helper.rb:27:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:27:in `block (2 levels) in <top (required)>'

spec was trying to call example from within another example.
This is a simple fix.

I have opened a pr that address this issue and a allows this gem to work in a non Rails app, though still needs to be tested with Rack::Test and rspec.

pr #19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions