From a8ed49b184fb1e7b3bb515f00974345bfbf6f9ce Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 20 Oct 2018 11:30:35 +0900 Subject: Avoid to warnings for deprecated interfaces. --- test/psych/test_exception.rb | 6 ++++++ test/psych/test_psych.rb | 6 ++++++ test/psych/test_safe_load.rb | 8 ++++++++ 3 files changed, 20 insertions(+) (limited to 'test') diff --git a/test/psych/test_exception.rb b/test/psych/test_exception.rb index 3c72f4a..df7fd73 100644 --- a/test/psych/test_exception.rb +++ b/test/psych/test_exception.rb @@ -15,6 +15,12 @@ module Psych def setup super @wups = Wups.new + + @orig_verbose, $VERBOSE = $VERBOSE, nil + end + + def teardown + $VERBOSE = @orig_verbose end def test_naming_exception diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index 3a04a3f..eeadc86 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -5,8 +5,14 @@ require 'stringio' require 'tempfile' class TestPsych < Psych::TestCase + + def setup + @orig_verbose, $VERBOSE = $VERBOSE, nil + end + def teardown Psych.domain_types.clear + $VERBOSE = @orig_verbose end def test_line_width_invalid diff --git a/test/psych/test_safe_load.rb b/test/psych/test_safe_load.rb index 82a5f19..6c7a8d0 100644 --- a/test/psych/test_safe_load.rb +++ b/test/psych/test_safe_load.rb @@ -3,6 +3,14 @@ require 'psych/helper' module Psych class TestSafeLoad < TestCase + def setup + @orig_verbose, $VERBOSE = $VERBOSE, nil + end + + def teardown + $VERBOSE = @orig_verbose + end + class Foo; end [1, 2.2, {}, [], "foo"].each do |obj| -- cgit v1.2.3