asking for changing the test suite of rubygem-rdiscount
Closed this issue · 2 comments
Migrated from email by Gerd Pokorra:
Hello,
would you be so kind to modify the RubyGem rdiscount so that it would
pass tests with the module MiniTest. It would be nice to have a new
version 2.1.7.2 with that tests.
This would make packaging rdiscount for Fedora easier.
https://fedoraproject.org/wiki/PackagingDrafts/Ruby#Running_test_suites
Best wishes
Gerd
Currently this test fails:
From the specfile:
%check
pushd .%{gem_instdir}
# Run test suite against Minitest 5.x needs some hacks.
# TODO: Upstream these changes if possible.
sed -i "/test\/unit/ s/^/#/" test/*.rb
# assert_nothing_raised is not supported by minitest.
sed -i "/assert_nothing_raised/ s/^/#/" test/*.rb
ruby -rminitest/autorun -I$(dirs +1)%{gem_extdir_mri} - << \EOF
Test = Minitest
Minitest::Test.send :alias_method, :assert_not_equal, :refute_equal
Dir.glob "./test/*_test.rb", &method(:require)
EOF
popd
From the build log:
+ ruby -rminitest/autorun
-I~/build/BUILD/rubygem-rdiscount-2.1.7.1/usr/lib/gems/ruby/rdiscount-2.1.7.1 -
/usr/share/gems/gems/minitest-4.7.0/lib/minitest/unit.rb:19:in `const_missing': uninitialized constant MiniTest::Test (NameError)
from -:2:in `<main>'
error: Bad exit status from /var/tmp/rpm-tmp.0jYYu7 (%check)
Bad exit status from /var/tmp/rpm-tmp.0jYYu7 (%check)
RPM build errors:
If I understand this request correctly, you want a MiniTest-compatible wrapper around the existing test suite. I don't intend on rewriting the current test suite to be MiniTest-native, as I think that would be too much work.
I'd suggest writing a single MiniTest suite that just delegates to rake test
, which will run the existing test suite. Check the status code of the output to see whether the underlying suite passed.
I'm not familar with MiniTest, so I'll delegate that task to you, Gerd.
Issue has received no response. Closing.