class
v1_9_3_392 -
Show latest stable
-
0 notes
- Superclass:
TestCase
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180 (0)
- 1_9_3_125 (33)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
Test case for creating new RDoc::Markup formatters. See test/test_rdoc_markup_to_*.rb for examples.
This test case adds a variety of tests to your subclass when #add_visitor_tests is called. Most tests set up a scenario then call a method you will provide to perform the assertion on the output.
Your subclass must instantiate a visitor and assign it to @to.
For example, test_accept_blank_line sets up a RDoc::Markup::BlockLine then calls accept_blank_line on your visitor. You are responsible for asserting that the output is correct.
Example:
class TestRDocMarkupToNewFormat < RDoc::Markup::FormatterTestCase add_visitor_tests def setup super @to = RDoc::Markup::ToNewFormat.new end def accept_blank_line assert_equal :junk, @to.res.join end # ... end