Closed jstrait closed 8 years ago
@hzulla FYI
So the gem works with ruby 1.9.3+, but the tests require ruby 2.1+?
@hzulla this gem works with Ruby 1.9.3+.
Before this PR, the test suite would pass with Ruby 1.9.3 and up. However, in Ruby 2.2 or 2.3 it would give the MiniTest::Unit::TestCase is now Minitest::Test
warning you mentioned in the other PR.
The reason for the warning is the Ruby 2.2 and 2.3 use a newer version of MiniTest by default. In this newer version, MiniTest::Unit::TestCase
has been renamed to Minitest::Test
. Ruby 1.9.3 through Ruby 2.1 use an older version of MiniTest by default.
When the test were changed to use Minitest::Test
, this removed the warnings in Ruby 2.2 and 2.3, but caused the tests to fail due to errors in Ruby 1.9.3 through 2.1.
This PR fixes the problem by adding a Gemfile so that the newer version of MiniTest is used regardless of the Ruby version, instead of the default version of MiniTest in whatever version of Ruby is being used. However, as a result the tests now need to be run using bundle exec rake test
(instead of rake test
), to ensure that the newer version of MiniTest is used.
@hzulla merging this in, let me know if you have any questions!
This involves changing usage of
MiniTest::Unit::TestCase
intoMinitest::Test
.Since this change will cause tests to fail on versions of Ruby 2.1 and earlier, due to them having an older version of the Minitest gem built in, this commit also introduces a Gemfile that specifies a more modern version of Minitest. This means that tests now need to be run using
bundle exec rake test
, instead ofrake test
.