diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-22 02:22:03 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-22 02:22:03 +0000 |
commit | 7a69af746135a2ecfc21cf717c4a4b217283ca15 (patch) | |
tree | 7a474c9536773a9351bd086ad335ece874d979ff | |
parent | 1497959ef5b69c9680931237c7558010130de166 (diff) | |
download | ruby-7a69af746135a2ecfc21cf717c4a4b217283ca15.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/rubygems/test_case.rb | 5 | ||||
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 7 |
3 files changed, 9 insertions, 7 deletions
@@ -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 diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index 9fbdfca52e..38e09ccd02 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -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 ## diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index f346240692..c0dfd4bafe 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -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 |