Skip to content

Conversation

@Haniyya
Copy link

@Haniyya Haniyya commented Jan 18, 2018

This enables the extractor to record doc_titles from an RSpec example.
This information is currently not used but it will be in #4 .

The changes are heavily inspired by Apipie#445 and @ghost s solution.

@Haniyya Haniyya requested a review from stex January 18, 2018 11:57
@stex stex merged commit 2406b66 into develop Jan 27, 2018
@stex
Copy link
Member

stex commented Jan 27, 2018

NB: When using a alias_example_to to record basic apipie examples, it will silently discard additional metadata if no example name is given (or rather use the metadata as example name I guess).
Therefore, an example name has to be given.

# rails_helper.rb
config.alias_example_to :apipie_example, :show_in_doc

# No title recorded (as none was given)
apipie_example do

# Title recorded
apipie_example 'I am name', doc_title: 'Something' do

# Not title recorded even though it seems one was given
apipie_example doc_title: 'Something'

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

Successfully merging this pull request may close these issues.

3 participants