Class: YARD::RSpecExamples::ItHandler
- Inherits:
-
Handlers::Ruby::Base
- Object
- Handlers::Ruby::Base
- YARD::RSpecExamples::ItHandler
- Defined in:
- lib/yard/rspec_examples/it_handler.rb
Overview
Handler that will set up the method <-> example map
Instance Method Summary collapse
Instance Method Details
#process ⇒ Object
8 9 10 11 12 13 |
# File 'lib/yard/rspec_examples/it_handler.rb', line 8 def process it_description = statement.parameters.source[1...-1] rspec_path_string = ParserTrace.path.dup.push(it_description).join(' ') #TODO: indentation depends on level of test indents. RSpecExampleRegistry.example_map[rspec_path_string] = statement.block.last.source.gsub("\n ", "\n") end |