mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Don't define tests if there is no psych.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dae4acbedd
commit
a3ace91f3e
2 changed files with 6 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue