ruby: Get rid of old Test::Unit compatibility

See this commit in hivex:
6dbbc474d3

(cherry picked from commit ecf361d723)
This commit is contained in:
Richard W.M. Jones
2023-09-21 15:20:55 +01:00
parent 12873e2107
commit fbe7e96cee
16 changed files with 29 additions and 49 deletions

View File

@@ -40,8 +40,7 @@ EXTRA_DIST = \
lib/guestfs.rb \
run-bindtests \
run-ruby-tests \
t/tc_*.rb \
t/test_helper.rb
t/tc_*.rb
CLEANFILES += \
lib/*~ \

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test010Load < Minitest::Test
def test_010_load

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test020Create < Minitest::Test
def test_020_create

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test030CreateFlags < Minitest::Test
def test_030_create_flags

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test040CreateMultiple < Minitest::Test
def test_040_create_multiple

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test050HandleProperties < Minitest::Test
def test_050_handle_properties

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test060ExplicitClose < Minitest::Test
def test_060_explicit_close

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test070Optargs < Minitest::Test
def test_070_optargs

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test090RetValues < Minitest::Test
def test_090_retvalues

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test100Launch < Minitest::Test
def test_100_launch

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test410CloseEvent < Minitest::Test
def test_410_close_event

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test420LogMessages < Minitest::Test
def test_420_log_messages

View File

@@ -15,7 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test800RHBZ507346 < Minitest::Test
def test_800_rhbz507346

View File

@@ -19,7 +19,8 @@
# the interpreter to segfault. See:
# https://bugzilla.redhat.com/show_bug.cgi?id=664558#c6
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test810RHBZ664558C6 < Minitest::Test
def test_810_rhbz_664558c6

View File

@@ -18,7 +18,8 @@
# Test that we don't break the old ::create module function while
# fixing https://bugzilla.redhat.com/show_bug.cgi?id=1046509
require File::join(File::dirname(__FILE__), 'test_helper')
require 'minitest/autorun'
require 'guestfs'
class Test820RHBZ1046509 < Minitest::Test
def _handleok(g)

View File

@@ -1,33 +0,0 @@
# libguestfs Ruby bindings -*- ruby -*-
# Copyright (C) 2009-2023 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
begin
require 'minitest/autorun'
rescue LoadError
require 'test/unit'
MiniTest = Test
module Test
Assertions = Unit::Assertions
module Assertions
alias refute_nil assert_not_nil
end
end
end
$:.unshift(File::join(File::dirname(__FILE__), "..", "lib"))
$:.unshift(File::join(File::dirname(__FILE__), "..", "ext", "guestfs"))
require 'guestfs'