module YARD::Doctest
Constants
- VERSION
Public Instance Methods
after(test = nil, &blk)
click to toggle source
Passed block called after each example or specific tests based on passed name.
It is evaluated in the same context as example.
@param [String] test @param [Proc] blk
# File lib/yard-doctest.rb, line 44 def after(test = nil, &blk) hooks[:after] << {test: test, block: blk} end
after_run(&blk)
click to toggle source
Passed block called after all examples and evaluated in the different context from examples.
It actually just sends block to `Minitest.after_run`.
@param [Proc] blk
# File lib/yard-doctest.rb, line 56 def after_run(&blk) Minitest.after_run &blk end
before(test = nil, &blk)
click to toggle source
Passed block called before each example or specific tests based on passed name.
It is evaluated in the same context as example.
@param [String] test @param [Proc] blk
# File lib/yard-doctest.rb, line 31 def before(test = nil, &blk) hooks[:before] << {test: test, block: blk} end
configure() { |self| ... }
click to toggle source
Configures YARD
doctest.
@yield [self]
# File lib/yard-doctest.rb, line 18 def configure yield self end
hooks()
click to toggle source
Returns hash with arrays of before/after hooks. @api private
# File lib/yard-doctest.rb, line 81 def hooks @hooks ||= {}.tap do |hash| hash[:before], hash[:after] = [], [] end end
skip(test)
click to toggle source
Adds definition of test to be skipped.
@param [Array<String>] test
# File lib/yard-doctest.rb, line 65 def skip(test) skips << test end
skips()
click to toggle source
Array of tests to be skipped. @api private
# File lib/yard-doctest.rb, line 73 def skips @skips ||= [] end