[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Convert Ruby tests from test-unit to minitest

From: James McCoy <jamessan_at_debian.org>
Date: Sat, 7 Nov 2015 22:09:37 -0500

On Fri, Nov 06, 2015 at 10:56:49AM -0500, James McCoy wrote:
> On Nov 5, 2015 6:27 AM, "Philip Martin" <philip.martin_at_wandisco.com> wrote:
> >
> > James McCoy <jamessan_at_debian.org> writes:
> >
> > > Ruby 2.2 changed test/unit from an in-tree wrapper around minitest
> > > 4 to a bundled version of the externally maintained ruby-test-unit gem.
> > > Similarly, the in-tree minitest was removed and the externally
> > > maintained ruby-minitest gem (of the 5.x series) is bundled.  These
> > > changes broke check-swig-rb, since the test framework APIs behave
> > > differently.
> >
> > This patch works on my Debian/stable system but not on CentOS 7 which
> > only has minitest 4.3.2.
> I've taken a look at instead supporting various versions of test-unit and
> should have a patch available tonight. I just need to do some more testing.

There's an outstanding issue that I've found in test_repos.rb's
test_load due to trying to modify a nil value, when Ruby 2.2 made
"frozen". I'll follow up on this in another email.

The attached patch, however, at least gets the test suite working with
the test-unit gem, which is a pre-requisite for testing against Ruby

Adapt Ruby tests to work with test-unit gem.

Ruby 2.2 bundles the test-unit gem instead of using the older "test-unit
API provided by minitest". This also fixes testing when the test-unit
gem happens to be installed along with older Ruby versions.

* Makefile.in:
  (check-swig-rb): Detect whether test-unit supports the --collector
   argument and, if so, use the dir collector.

* subversion/bindings/swig/ruby/test/my-assertions.rb:
  (_my_assert_block): Remove unnecessary assert_block.

* subversion/bindings/swig/ruby/test/test_wc.rb:
  (test_context_create): Remove useless assertion on result of
   Svn::Wc::Create, especially since it varies based on Ruby version.

GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <jamessan_at_debian.org>

Received on 2015-11-08 04:09:58 CET

This is an archived mail posted to the Subversion Dev mailing list.