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

ruby-changes:34807

From: nobu <ko1@a...>
Date: Mon, 21 Jul 2014 15:30:09 +0900 (JST)
Subject: [ruby-changes:34807] nobu:r46890 (trunk): test/rake: fix tests under test-all

nobu	2014-07-21 15:29:53 +0900 (Mon, 21 Jul 2014)

  New Revision: 46890

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

  Log:
    test/rake: fix tests under test-all
    
    * test/rake/test_rake_application.rb (test_display_exception_details):
      `RbConfig::CONFIG["prefix"]` can be the root directory, under
      test-all.
    
    * test/rake/test_rake_test_task.rb (test_run_code_rake_default_gem):
      `-I` may be inserted, under test-all.

  Modified files:
    trunk/test/rake/test_rake_application.rb
    trunk/test/rake/test_rake_test_task.rb
Index: test/rake/test_rake_test_task.rb
===================================================================
--- test/rake/test_rake_test_task.rb	(revision 46889)
+++ test/rake/test_rake_test_task.rb	(revision 46890)
@@ -105,7 +105,7 @@ class TestRakeTestTask < Rake::TestCase https://github.com/ruby/ruby/blob/trunk/test/rake/test_rake_test_task.rb#L105
       t.loader = :rake
     end
 
-    assert_match(/\A ".*?"\Z/, test_task.run_code)
+    assert_match(/\A(-I".*?" *)* ".*?"\Z/, test_task.run_code)
   ensure
     Gem.loaded_specs['rake'] = rake
   end
Index: test/rake/test_rake_application.rb
===================================================================
--- test/rake/test_rake_application.rb	(revision 46889)
+++ test/rake/test_rake_application.rb	(revision 46890)
@@ -17,8 +17,10 @@ class TestRakeApplication < Rake::TestCa https://github.com/ruby/ruby/blob/trunk/test/rake/test_rake_application.rb#L17
   end
 
   def test_display_exception_details
+    obj = Object.new
+    obj.instance_eval("def #{__method__}; raise 'test'; end", "ruby")
     begin
-      raise 'test'
+      obj.__send__(__method__)
     rescue => ex
     end
 

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

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