* lib/rubygems/test_case.rb: run test with psych if exist.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-08-22 02:22:03 +00:00
parent 1497959ef5
commit 7a69af7461
3 changed files with 9 additions and 7 deletions

View File

@ -1,3 +1,7 @@
Wed Aug 22 11:20:47 2012 NARUSE, Yui <naruse@ruby-lang.org>
* lib/rubygems/test_case.rb: run test with psych if exist.
Thu Aug 16 12:09:51 2012 Yuki Yugui Sonoda <yugui@google.com>
* nacl/pepper_main.c (init_loadpath): Pushes the correct load path on

View File

@ -207,6 +207,9 @@ class Gem::TestCase < MiniTest::Unit::TestCase
Gem.pre_uninstall do |uninstaller|
@pre_uninstall_hook_arg = uninstaller
end
@orig_yamler = YAML::ENGINE.yamler
YAML::ENGINE.yamler = 'psych' rescue nil
end
##
@ -238,6 +241,8 @@ class Gem::TestCase < MiniTest::Unit::TestCase
else
ENV.delete 'HOME'
end
YAML::ENGINE.yamler = @orig_yamler
end
##

View File

@ -39,8 +39,6 @@ end
def setup
super
@orig_yamler = YAML::ENGINE.yamler
YAML::ENGINE.yamler = 'psych'
@a1 = quick_spec 'a', '1' do |s|
s.executable = 'exec'
@ -67,11 +65,6 @@ end
load 'rubygems/syck_hack.rb'
end
def teardown
super
YAML::ENGINE.yamler = @orig_yamler
end
def test_self_attribute_names
expected_value = %w[
authors