diff options
Diffstat (limited to 'test/psych')
-rw-r--r-- | test/psych/test_yamldbm.rb | 3 | ||||
-rw-r--r-- | test/psych/test_yamlstore.rb | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/test/psych/test_yamldbm.rb b/test/psych/test_yamldbm.rb index 5fd2d77ed6..1b5d4447b4 100644 --- a/test/psych/test_yamldbm.rb +++ b/test/psych/test_yamldbm.rb @@ -1,6 +1,7 @@ # -*- coding: UTF-8 -*- begin require 'test/unit' + require 'psych' require 'yaml/dbm' require 'tmpdir' rescue LoadError @@ -191,4 +192,4 @@ module Psych assert_equal([], @yamldbm.select {false}) end end -end if defined?(YAML::DBM) +end if defined?(YAML::DBM) && defined?(Psych) diff --git a/test/psych/test_yamlstore.rb b/test/psych/test_yamlstore.rb index d607013ada..c31b33f5ed 100644 --- a/test/psych/test_yamlstore.rb +++ b/test/psych/test_yamlstore.rb @@ -1,10 +1,11 @@ require 'test/unit' +require 'psych' require 'yaml/store' require 'tmpdir' -Psych::Store = YAML::Store unless defined?(Psych::Store) - module Psych + Psych::Store = YAML::Store unless defined?(Psych::Store) + class YAMLStoreTest < Test::Unit::TestCase def setup @engine, YAML::ENGINE.yamler = YAML::ENGINE.yamler, 'psych' @@ -84,4 +85,4 @@ module Psych end end end -end +end if defined?(Psych) |