From a4a2fbdf6465b879977dea2d0105682c09a639c7 Mon Sep 17 00:00:00 2001 From: kou Date: Sat, 15 Nov 2014 11:17:33 +0000 Subject: [PATCH] * test/rexml/test_document.rb (REXMLTests::TestDocument::EntityExpansionLimitTest): Use setup and teardown instead of ensure in test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ test/rexml/test_document.rb | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5dc0edb3b2..f3ff49c932 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Nov 15 20:16:59 2014 Kouhei Sutou + + * test/rexml/test_document.rb + (REXMLTests::TestDocument::EntityExpansionLimitTest): Use + setup and teardown instead of ensure in test. + Sat Nov 15 20:11:34 2014 Kouhei Sutou * test/rexml/test_document.rb (REXMLTests::TestDocument): Group diff --git a/test/rexml/test_document.rb b/test/rexml/test_document.rb index a428e55dd4..567b357480 100644 --- a/test/rexml/test_document.rb +++ b/test/rexml/test_document.rb @@ -33,6 +33,14 @@ EOF end class EntityExpansionLimitTest < Test::Unit::TestCase + def setup + @default_entity_expansion_limit = REXML::Security.entity_expansion_limit + end + + def teardown + REXML::Security.entity_expansion_limit = @default_entity_expansion_limit + end + XML_WITH_NESTED_ENTITY = <