diff options
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 7 |
1 files 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 |