1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
From: Daniel Leidert <dleidert@debian.org>
Date: Fri, 17 Apr 2020 23:59:16 +0200
Subject: Load library from standard path
---
test/mac_test.rb | 6 ++----
test/testing.rb | 4 ----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/test/mac_test.rb b/test/mac_test.rb
index a20a7ac..c8ffd9b 100644
--- a/test/mac_test.rb
+++ b/test/mac_test.rb
@@ -23,10 +23,8 @@ end
BEGIN {
$testdir = File.dirname(File.expand_path(__FILE__))
- $rootdir = File.dirname($testdir)
- $libdir = File.join($rootdir, 'lib')
- require File.join($libdir, 'macaddr')
- require File.join($testdir, 'testing')
+ require 'macaddr'
+ require 'testing'
$datadir = File.join($testdir, 'data')
$data = {}
diff --git a/test/testing.rb b/test/testing.rb
index 4d53fc8..686bb1b 100644
--- a/test/testing.rb
+++ b/test/testing.rb
@@ -1,14 +1,10 @@
require 'test/unit'
testdir = File.expand_path(File.dirname(__FILE__))
-rootdir = File.dirname(testdir)
-libdir = File.join(rootdir, 'lib')
STDOUT.sync = true
$:.unshift(testdir) unless $:.include?(testdir)
-$:.unshift(libdir) unless $:.include?(libdir)
-$:.unshift(rootdir) unless $:.include?(rootdir)
def Testing(*args, &block)
Class.new(Test::Unit::TestCase) do
|