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

ruby-changes:20594

From: naruse <ko1@a...>
Date: Sat, 23 Jul 2011 20:26:48 +0900 (JST)
Subject: [ruby-changes:20594] naruse:r32642 (trunk): * test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base

naruse	2011-07-23 20:21:55 +0900 (Sat, 23 Jul 2011)

  New Revision: 32642

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

  Log:
    * test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base
      directory. Current directory is not the top source directory when
      the building process runs on other than there.
    
    * test/rake/test_rake_rake_test_loader.rb: ditto.
    
    * test/rake/test_rake_task_argument_parsing.rb
      (test_terminal_width_using_hardcoded_80): hardcoded 80 is used
      when app.unix? is false.

  Modified files:
    trunk/ChangeLog
    trunk/test/rake/test_rake_functional.rb
    trunk/test/rake/test_rake_rake_test_loader.rb
    trunk/test/rake/test_rake_task_argument_parsing.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32641)
+++ ChangeLog	(revision 32642)
@@ -1,3 +1,15 @@
+Sat Jul 23 20:12:52 2011  NARUSE, Yui  <naruse@r...>
+
+	* test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base
+	  directory. Current directory is not the top source directory when
+	  the building process runs on other than there.
+
+	* test/rake/test_rake_rake_test_loader.rb: ditto.
+
+	* test/rake/test_rake_task_argument_parsing.rb
+	  (test_terminal_width_using_hardcoded_80): hardcoded 80 is used
+	  when app.unix? is false.
+
 Sat Jul 23 20:11:50 2011  Tadayoshi Funaba  <tadf@d...>
 
 	* ext/date/date_core.c: an issue that is same as  [ruby-dev:44071].
Index: test/rake/test_rake_functional.rb
===================================================================
--- test/rake/test_rake_functional.rb	(revision 32641)
+++ test/rake/test_rake_functional.rb	(revision 32642)
@@ -5,8 +5,8 @@
 class TestRakeFunctional < Rake::TestCase
 
   def setup
-    @rake_path = File.expand_path("bin/rake")
-    lib_path = File.expand_path("lib")
+    @rake_path = File.expand_path("../../../bin/rake", __FILE__)
+    lib_path = File.expand_path("../../../lib", __FILE__)
     @ruby_options = ["-I#{lib_path}", "-I."]
     @verbose = ENV['VERBOSE']
 
Index: test/rake/test_rake_task_argument_parsing.rb
===================================================================
--- test/rake/test_rake_task_argument_parsing.rb	(revision 32641)
+++ test/rake/test_rake_task_argument_parsing.rb	(revision 32642)
@@ -67,7 +67,7 @@
   end
 
   def test_terminal_width_using_hardcoded_80
-    def @app.unix?() true end
+    def @app.unix?() false end
 
     assert_equal 80, @app.terminal_width
   end
Index: test/rake/test_rake_rake_test_loader.rb
===================================================================
--- test/rake/test_rake_rake_test_loader.rb	(revision 32641)
+++ test/rake/test_rake_rake_test_loader.rb	(revision 32642)
@@ -10,7 +10,7 @@
 
     ARGV.replace %w[foo.rb test_*.rb -v]
 
-    load File.join(@orig_PWD, 'lib/rake/rake_test_loader.rb')
+    load File.expand_path('../../../lib/rake/rake_test_loader.rb', __FILE__)
 
     assert_equal %w[-v], ARGV
   ensure

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

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