summaryrefslogtreecommitdiff
path: root/test/psych/test_yamlstore.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-03 15:54:16 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-03 15:54:16 +0000
commita3ace91f3e233a3f7b9db27e20d4496a9e0cfd24 (patch)
treee2ed477209286803a345a59b68f210ff0b368560 /test/psych/test_yamlstore.rb
parentdae4acbedd77ea7eb19127a43c6f66079fdbd0df (diff)
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
Diffstat (limited to 'test/psych/test_yamlstore.rb')
-rw-r--r--test/psych/test_yamlstore.rb7
1 files changed, 4 insertions, 3 deletions
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)