From 35e1681a179c28d5b6ec97d4ab1c110e5ac00303 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sat, 17 Aug 2024 16:21:19 +0900 Subject: [PATCH] test tree-parser: move common method to base class --- test/parser/test_tree.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/parser/test_tree.rb b/test/parser/test_tree.rb index 88bc075c..cdd28d2c 100644 --- a/test/parser/test_tree.rb +++ b/test/parser/test_tree.rb @@ -5,6 +5,12 @@ module REXMLTests class TestTreeParser < Test::Unit::TestCase + private def parse(xml) + document = REXML::Document.new + parser = REXML::Parsers::TreeParser.new(xml, document) + parser.parse + end + class TestInvalid < self def test_unmatched_close_tag xml = "" @@ -31,13 +37,6 @@ def test_no_close_tag Last 80 unconsumed characters: MESSAGE end - - private - def parse(xml) - document = REXML::Document.new - parser = REXML::Parsers::TreeParser.new(xml, document) - parser.parse - end end end end