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

ruby-changes:38109

From: nobu <ko1@a...>
Date: Thu, 9 Apr 2015 15:01:46 +0900 (JST)
Subject: [ruby-changes:38109] nobu:r50190 (trunk): skip rake dependent tests

nobu	2015-04-09 15:01:27 +0900 (Thu, 09 Apr 2015)

  New Revision: 50190

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

  Log:
    skip rake dependent tests
    
    rake is not available until installation now, so skip rake
    dependent tests unless it can load.

  Modified files:
    trunk/test/rdoc/test_rdoc_task.rb
    trunk/test/rubygems/test_gem_package_task.rb
Index: test/rubygems/test_gem_package_task.rb
===================================================================
--- test/rubygems/test_gem_package_task.rb	(revision 50189)
+++ test/rubygems/test_gem_package_task.rb	(revision 50190)
@@ -1,6 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_package_task.rb#L1
 require 'rubygems/test_case'
 require 'rubygems'
-require 'rubygems/package_task'
+begin
+  require 'rubygems/package_task'
+rescue LoadError
+end
 
 class TestGemPackageTask < Gem::TestCase
 
@@ -76,5 +79,5 @@ class TestGemPackageTask < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_package_task.rb#L79
     assert_equal 'pkg/nokogiri-1.5.0-java', pkg.package_dir_path
   end
 
-end
+end if defined?(Rake::PackageTask)
 
Index: test/rdoc/test_rdoc_task.rb
===================================================================
--- test/rdoc/test_rdoc_task.rb	(revision 50189)
+++ test/rdoc/test_rdoc_task.rb	(revision 50190)
@@ -1,5 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_task.rb#L1
 require 'rdoc/test_case'
-require 'rake'
+begin
+  require 'rake'
+rescue LoadError
+end
 
 class TestRDocTask < RDoc::TestCase
 
@@ -166,5 +169,5 @@ class TestRDocTask < RDoc::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_task.rb#L169
     assert_equal %w[-o html] << "--title" << "Test Title Option", rdoc_task.option_list
   end
 
-end
+end if defined?(Rake::Task)
 

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

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