https://bugzilla.redhat.com/show_bug.cgi?id=836368
--- Comment #2 from Josef Stribny jstribny@redhat.com --- Also:
* The spec file doesn't run tests. You should always run the test suite, especially if it's provided by upstream. Include the tests that come with the gem and run them in %check section. If they are based on Test::Unit you can use minitest to run them (which is a recommended way).
In your spec file:
- require minitest BuildRequires: rubygem(minitest)
- add check section that goes after %build %check pushd .%{gem_instdir} testrb -Ilib test
When I added this %check section I got following errors:
``` Finished tests in 2.049980s, 2.4390 tests/s, 1.9512 assertions/s.
1) Error: test_oscrc_parsing(NovellPlugin_test): NameError: undefined local variable or method `user' for Bicho::Plugins::Novell:Class
/home/strzibny/rpmbuild/BUILD/rubygem-bicho-0.0.6/usr/share/gems/gems/bicho-0.0.6/lib/bicho/plugins/novell.rb:70:in `oscrc_credentials'
/home/strzibny/rpmbuild/BUILD/rubygem-bicho-0.0.6/usr/share/gems/gems/bicho-0.0.6/test/test_novell_plugin.rb:21:in `test_oscrc_parsing'
2) Error: test_urls_are_correct(NovellPlugin_test): NameError: undefined local variable or method `user' for Bicho::Plugins::Novell:Class
/home/strzibny/rpmbuild/BUILD/rubygem-bicho-0.0.6/usr/share/gems/gems/bicho-0.0.6/lib/bicho/plugins/novell.rb:70:in `oscrc_credentials'
/home/strzibny/rpmbuild/BUILD/rubygem-bicho-0.0.6/usr/share/gems/gems/bicho-0.0.6/lib/bicho/plugins/novell.rb:77:in `transform_api_url_hook'
/home/strzibny/rpmbuild/BUILD/rubygem-bicho-0.0.6/usr/share/gems/gems/bicho-0.0.6/lib/bicho/client.rb:115:in `block in initialize'
/home/strzibny/rpmbuild/BUILD/rubygem-bicho-0.0.6/usr/share/gems/gems/bicho-0.0.6/lib/bicho/client.rb:108:in `each'
/home/strzibny/rpmbuild/BUILD/rubygem-bicho-0.0.6/usr/share/gems/gems/bicho-0.0.6/lib/bicho/client.rb:108:in `initialize'
/home/strzibny/rpmbuild/BUILD/rubygem-bicho-0.0.6/usr/share/gems/gems/bicho-0.0.6/test/test_novell_plugin.rb:7:in `new'
/home/strzibny/rpmbuild/BUILD/rubygem-bicho-0.0.6/usr/share/gems/gems/bicho-0.0.6/test/test_novell_plugin.rb:7:in `test_urls_are_correct'
5 tests, 4 assertions, 0 failures, 2 errors, 0 skips error: Bad exit status from /var/tmp/rpm-tmp.FF2Q3X (%check) ``` Note: I get this also with the current master branch [1].
[1] https://github.com/dmacvicar/bicho