diff options
author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-09 02:18:18 +0000 |
---|---|---|
committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-09 02:18:18 +0000 |
commit | a30fd3b6604237ef112412928a9c077886415854 (patch) | |
tree | 0837badd749cdc29361b98f8235b3571e1f88b91 /test/psych | |
parent | 82f1f640ec4a59bd77cde7fee509080828406835 (diff) | |
download | ruby-a30fd3b6604237ef112412928a9c077886415854.tar.gz |
* test/psych/test_yamldbm.rb: don't run test if the system
don't support yaml/dbm.
* test/syck/test_yamldbm.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych')
-rw-r--r-- | test/psych/test_yamldbm.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/psych/test_yamldbm.rb b/test/psych/test_yamldbm.rb index 165125f65e..c60a18febe 100644 --- a/test/psych/test_yamldbm.rb +++ b/test/psych/test_yamldbm.rb @@ -1,10 +1,14 @@ # -*- coding: UTF-8 -*- -require 'test/unit' -require 'yaml/dbm' -require 'tmpdir' -Psych::DBM = YAML::DBM unless defined?(Psych::DBM) +begin + require 'test/unit' + require 'yaml/dbm' + require 'tmpdir' +rescue LoadError +end module Psych + ::Psych::DBM = ::YAML::DBM unless defined?(::Psych::DBM) + class YAMLDBMTest < Test::Unit::TestCase def setup @engine, YAML::ENGINE.yamler = YAML::ENGINE.yamler, 'psych' @@ -187,4 +191,4 @@ module Psych assert_equal([], @yamldbm.select {false}) end end -end +end if defined?(YAML::DBM) |