[前][次][番号順一覧][スレッド一覧]

ruby-changes:23391

From: nobu <ko1@a...>
Date: Mon, 23 Apr 2012 22:49:05 +0900 (JST)
Subject: [ruby-changes:23391] nobu:r35442 (trunk): test with psych

nobu	2012-04-23 22:48:45 +0900 (Mon, 23 Apr 2012)

  New Revision: 35442

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35442

  Log:
    test with psych
    
    * test/rubygems/test_gem_specification.rb (test_to_yaml_emits_syck_compat_yaml):
      test with psych.

  Modified files:
    trunk/test/rubygems/test_gem_specification.rb

Index: test/rubygems/test_gem_specification.rb
===================================================================
--- test/rubygems/test_gem_specification.rb	(revision 35441)
+++ test/rubygems/test_gem_specification.rb	(revision 35442)
@@ -1210,13 +1210,16 @@
 
   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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]