From e0431daa00c45948d21ff46304aa885d465c9f57 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 23 Apr 2012 13:48:45 +0000 Subject: [PATCH] test with psych * test/rubygems/test_gem_specification.rb (test_to_yaml_emits_syck_compat_yaml): test with psych. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rubygems/test_gem_specification.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index ce9212e751..c19d364c66 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -1210,13 +1210,16 @@ end def test_to_yaml_emits_syck_compat_yaml if YAML.const_defined?(:ENGINE) && !YAML::ENGINE.syck? + yamler, YAML::ENGINE.yamler = YAML::ENGINE.yamler, 'psych' + end + begin @a1.add_dependency "gx", "1.0.0" y = @a1.to_yaml refute_match %r!^\s*- - =!, y - else - skip "Only validates psych yaml" + ensure + YAML::ENGINE.yamler = yamler if yamler end end