Skip to content

tests: switch to minitest #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2014
Merged

tests: switch to minitest #160

merged 1 commit into from
May 15, 2014

Conversation

ktdreyer
Copy link

@ktdreyer ktdreyer commented Apr 8, 2014

Ruby 1.9+ uses Minitest as the backend for Test::Unit. As of Minitest 5, the shim no longer supports Test::Unit::TestCase.

Adjust the svn2git test suite to support Minitest 5's syntax.

Minitest versions 4 and below do not support the newer Minitest::Test class that arrived in version 5. For that case, use the MiniTest::Unit::TestCase class as a fallback.

@nirvdrum
Copy link
Owner

Thanks. I've just gotten a chance to look at this and it looks pretty good. I need to make a slight modification to get the tests running on 1.8. It appears that require 'test/unit' would implicitly require 'rubygems', whereas require 'minitest/autorun' will not. This isn't a problem on 1.9+ because rubygems is always loaded.

Ruby 1.9+ uses Minitest as the backend for Test::Unit. As of Minitest 5,
the shim no longer supports Test::Unit::TestCase.

Adjust the svn2git test suite to support Minitest 5's syntax.

Minitest versions 4 and below do not support the newer Minitest::Test
class that arrived in version 5. For that case, use the
MiniTest::Unit::TestCase class as a fallback.
@ktdreyer
Copy link
Author

Thanks for the patch review.

I've amended the original commit 3e25ed8 to 85106f7 . I've added require 'rubygems' and I've rebased onto master. With this change, I've confirmed that rake test passes on CentOS 6 (ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux])

nirvdrum added a commit that referenced this pull request May 15, 2014
@nirvdrum nirvdrum merged commit 8e0ce38 into nirvdrum:master May 15, 2014
@nirvdrum
Copy link
Owner

Thanks for the quick turnaround. I was just informing you why I hadn't merged it yet -- I was planning on fixing it up myself. But this is even better :-)

I tested in 1.8.7-p375, 2.1.2p95, and JRuby 1.7.12 (1.9 mode). It seems to check out everywhere. Now I just need to get more tests in there :-/

@ktdreyer
Copy link
Author

Cool, thanks for merging :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants