summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-10-20 11:30:35 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-10-20 11:30:35 +0900
commita8ed49b184fb1e7b3bb515f00974345bfbf6f9ce (patch)
tree0cbfb8af4e13dd1b443b75c7b10879e0e62410df
parentda2947306e78c6db8b3ff1071ae64452a9781956 (diff)
downloadpsych-a8ed49b184fb1e7b3bb515f00974345bfbf6f9ce.tar.gz
Avoid to warnings for deprecated interfaces.
-rw-r--r--test/psych/test_exception.rb6
-rw-r--r--test/psych/test_psych.rb6
-rw-r--r--test/psych/test_safe_load.rb8
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|