diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-10-20 11:30:35 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-10-20 11:30:35 +0900 |
commit | a8ed49b184fb1e7b3bb515f00974345bfbf6f9ce (patch) | |
tree | 0cbfb8af4e13dd1b443b75c7b10879e0e62410df | |
parent | da2947306e78c6db8b3ff1071ae64452a9781956 (diff) | |
download | psych-a8ed49b184fb1e7b3bb515f00974345bfbf6f9ce.tar.gz |
Avoid to warnings for deprecated interfaces.
-rw-r--r-- | test/psych/test_exception.rb | 6 | ||||
-rw-r--r-- | test/psych/test_psych.rb | 6 | ||||
-rw-r--r-- | test/psych/test_safe_load.rb | 8 |
3 files changed, 20 insertions, 0 deletions
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| |