summaryrefslogtreecommitdiff
path: root/test/psych/test_yamldbm.rb
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-09 02:18:18 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-09 02:18:18 +0000
commita30fd3b6604237ef112412928a9c077886415854 (patch)
tree0837badd749cdc29361b98f8235b3571e1f88b91 /test/psych/test_yamldbm.rb
parent82f1f640ec4a59bd77cde7fee509080828406835 (diff)
* 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/test_yamldbm.rb')
-rw-r--r--test/psych/test_yamldbm.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/psych/test_yamldbm.rb b/test/psych/test_yamldbm.rb
index 165125f..c60a18f 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)