On Fri, Mar 21, 2014 at 10:18 AM, Mamoru TASAKA
rubygem-escape_utils (not yet in Fedora) was also converted upstream
to Minitest 5. Here's what I used in %prep to switch back to the old
Minitest 4 syntax:
# Get the major version number of the Minitest gem
minitest=$(ruby -r 'minitest/unit' \
-e "puts Minitest::Unit::VERSION.split('.')")
if [ $minitest > 5 ]; then
# Conditionally correct Minitest usage, for Minitest versions < 5.0.0.
# For example, at least Fedora 20 has Minitest 4.x.
for f in $(find test -type f); do
sed -i "s/Minitest::Test/Minitest::Unit::TestCase/g" $f
This should be forward-compatible with Minitest 5 when it lands in Fedora 21.