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

ruby-changes:56561

From: Hiroshi <ko1@a...>
Date: Mon, 15 Jul 2019 18:21:08 +0900 (JST)
Subject: [ruby-changes:56561] Hiroshi SHIBATA: 1b59ed9b49 (master): Move helper file of logger to under the test/logger.

https://git.ruby-lang.org/ruby.git/commit/?id=1b59ed9b49

From 1b59ed9b494104d3a571bb222ee843cd82d1c9ba Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Mon, 15 Jul 2019 14:39:10 +0900
Subject: Move helper file of logger to under the test/logger.


diff --git a/test/helper.rb b/test/helper.rb
deleted file mode 100644
index d293321..0000000
--- a/test/helper.rb
+++ /dev/null
@@ -1,5 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/#L0
-ROOT_DIR = File.dirname(__dir__)
-$LOAD_PATH.unshift File.join(ROOT_DIR, 'lib') # to use logger in this repo instead of ruby built-in logger
-$LOAD_PATH.unshift File.join(ROOT_DIR, 'test', 'lib') # to use custom test-unit in this repo
-require 'logger'
-require 'test/unit'
diff --git a/test/logger/helper.rb b/test/logger/helper.rb
new file mode 100644
index 0000000..d293321
--- /dev/null
+++ b/test/logger/helper.rb
@@ -0,0 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/test/logger/helper.rb#L1
+ROOT_DIR = File.dirname(__dir__)
+$LOAD_PATH.unshift File.join(ROOT_DIR, 'lib') # to use logger in this repo instead of ruby built-in logger
+$LOAD_PATH.unshift File.join(ROOT_DIR, 'test', 'lib') # to use custom test-unit in this repo
+require 'logger'
+require 'test/unit'
diff --git a/test/logger/test_logdevice.rb b/test/logger/test_logdevice.rb
index 40f646d..2c842e9 100644
--- a/test/logger/test_logdevice.rb
+++ b/test/logger/test_logdevice.rb
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/test/logger/test_logdevice.rb#L1
 # coding: US-ASCII
 # frozen_string_literal: false
-require_relative '../helper'
+require_relative 'helper'
 require 'tempfile'
 require 'tmpdir'
 
diff --git a/test/logger/test_logger.rb b/test/logger/test_logger.rb
index 0292038..da68e58 100644
--- a/test/logger/test_logger.rb
+++ b/test/logger/test_logger.rb
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/test/logger/test_logger.rb#L1
 # coding: US-ASCII
 # frozen_string_literal: false
-require_relative '../helper'
+require_relative 'helper'
 require 'tempfile'
 
 class TestLogger < Test::Unit::TestCase
diff --git a/test/logger/test_logperiod.rb b/test/logger/test_logperiod.rb
index e3be0a6..5c5318a 100644
--- a/test/logger/test_logperiod.rb
+++ b/test/logger/test_logperiod.rb
@@ -1,7 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/test/logger/test_logperiod.rb#L1
 # coding: US-ASCII
 # frozen_string_literal: false
-require 'test/unit'
-require 'logger'
+require_relative 'helper'
 require 'time'
 
 class TestLogPeriod < Test::Unit::TestCase
diff --git a/test/logger/test_severity.rb b/test/logger/test_severity.rb
index 4da23cd..1197e8a 100644
--- a/test/logger/test_severity.rb
+++ b/test/logger/test_severity.rb
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/test/logger/test_severity.rb#L1
 # coding: US-ASCII
 # frozen_string_literal: false
-require_relative '../helper'
+require_relative 'helper'
 
 class TestLoggerSeverity < Test::Unit::TestCase
   def test_enum
-- 
cgit v0.10.2


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

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