Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using show_in_doc #118

Closed
Nerian opened this issue Apr 25, 2013 · 4 comments
Closed

Using show_in_doc #118

Nerian opened this issue Apr 25, 2013 · 4 comments

Comments

@Nerian
Copy link
Contributor

Nerian commented Apr 25, 2013

Hello,

I am not sure how to use the show_in_doc option.

My first thought was that it was metadata for an example, like:

    context "With correct credentials", :show_in_doc => true do
      it "Can authenticate" do
        ....
      end
    end

    context "with incorrect credentials", :show_in_doc => false do
      it "Can't authenticate" do
          ....
      end
    end

But this doesn't seems to have any effect.

Can you give an example?

@Nerian
Copy link
Contributor Author

Nerian commented Apr 25, 2013

I ended up doing this in spec_helper.rb

RSpec.configure do |config|
   config.filter_run :show_in_doc => true if ENV['APIPIE_RECORD']
end

@iNecas
Copy link
Member

iNecas commented Apr 26, 2013

Hi,

The show_in_doc now is an attribute that can be find directly in the generated doc/apipie_examples.yml, so you can tweak the output somehow there.

I like your approach. Feel free to add this tip into the README and send PR (I can do it, but the authorship information will be lost :)

@Nerian
Copy link
Contributor Author

Nerian commented Apr 26, 2013

Sure thing. Pull request sent :)

@iNecas
Copy link
Member

iNecas commented Apr 27, 2013

I believe we can close the issue then. Thanks for contribution

@iNecas iNecas closed this as completed Apr 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants