Skip to content

Commit ec8ef12

Browse files
committed
Remove parser module indirection used in testing
The ripper parser is gone, so this is not needed anymore Makes it so that I can easily run individual tests via ruby-lsp It's their limitation really but seems ok to do regardless
1 parent 6912fc4 commit ec8ef12

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ exe/
238238
- **Parsers:** Prism-based Ruby (`RDoc::Parser::Ruby`), C, Markdown, RD
239239
- **Generators:** HTML/Aliki (default), HTML/Darkfish (deprecated), RI, POT (gettext), JSON, Markup
240240

241-
Parser tests live in the `RDocParserRubyTestCases` module (`test/rdoc/parser/ruby_test.rb`) and are included by `RDocParserRubyTest`. Add new parser tests to the mixin.
241+
Parser tests live in the `RDocParserRubyTest` class (`test/rdoc/parser/ruby_test.rb`).
242242

243243
### Code Object Model and Constant Aliases
244244

test/rdoc/parser/ruby_test.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require 'rdoc/parser'
55
require 'rdoc/parser/ruby'
66

7-
module RDocParserRubyTestCases
7+
class RDocParserRubyTest < RDoc::TestCase
88
def setup
99
super
1010

@@ -2528,10 +2528,6 @@ def m2; end
25282528
assert_equal "foo1\nbar1", m1.call_seq.chomp
25292529
assert_equal "ARGF.readlines(a)\nARGF.readlines(b)\nARGF.readlines(c)\nARGF.readlines(d)", m2.call_seq.chomp
25302530
end
2531-
end
2532-
2533-
class RDocParserRubyTest < RDoc::TestCase
2534-
include RDocParserRubyTestCases
25352531

25362532
def util_parser(content)
25372533
@parser = RDoc::Parser::Ruby.new @top_level, content, @options, @stats

0 commit comments

Comments
 (0)