diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-02-06 11:48:37 +0200 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-02-06 11:48:37 +0200 |
commit | 6b689e434c69bed5ebbf4b078d19e2c366d85f27 (patch) | |
tree | 2d60892e2373726b4f6443e5feb85676b420915f | |
parent | 43fa4aa38492c80080efa61aa4b7bee422792bc7 (diff) | |
download | psych-6b689e434c69bed5ebbf4b078d19e2c366d85f27.tar.gz |
fix minitest warnings
-rw-r--r-- | test/psych/helper.rb | 8 | ||||
-rw-r--r-- | test/psych/test_to_yaml_properties.rb | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/test/psych/helper.rb b/test/psych/helper.rb index 11b2216..0111e11 100644 --- a/test/psych/helper.rb +++ b/test/psych/helper.rb @@ -5,7 +5,13 @@ require 'date' require 'psych' module Psych - class TestCase < MiniTest::Unit::TestCase + superclass = if defined?(Minitest::Test) + Minitest::Test + else + MiniTest::Unit::TestCase + end + + class TestCase < superclass def self.suppress_warning verbose, $VERBOSE = $VERBOSE, nil yield diff --git a/test/psych/test_to_yaml_properties.rb b/test/psych/test_to_yaml_properties.rb index 5b4860c..724aab4 100644 --- a/test/psych/test_to_yaml_properties.rb +++ b/test/psych/test_to_yaml_properties.rb @@ -1,7 +1,7 @@ require_relative 'helper' module Psych - class TestToYamlProperties < MiniTest::Unit::TestCase + class TestToYamlProperties < Psych::TestCase class Foo attr_accessor :a, :b, :c def initialize |