Skip to content

Commit b47795f

Browse files
committed
Access the current example through new RSpec.current_example
1 parent a772398 commit b47795f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/rspec_api_documentation/dsl/endpoint.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ def explanation(text)
108108

109109
private
110110

111+
def example
112+
RSpec.current_example
113+
end
114+
111115
def rspec_api_documentation_client
112116
send(RspecApiDocumentation.configuration.client_method)
113117
end

0 commit comments

Comments
 (0)