Run all tests in gemspec
While updating the ruby-augeas spec in Fedora I noticed that a new test was added. This makes sure all the tests run.
Hi Ewoud,
Thanks for spotting this. There are indeed additional tests which are not included in the spec file.
The existing %check command covers 21 tests:
> ruby tests/tc_augeas.rb
Loaded suite tests/tc_augeas
Started
Finished in 10.278106927 seconds.
---------------------------------------------------------------------------------------------------------------------------------------------
21 tests, 79 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
---------------------------------------------------------------------------------------------------------------------------------------------
2.04 tests/s, 7.69 assertions/s
There are a further 58 tests in tc_facade.rb
> ruby tests/tc_facade.rb
Loaded suite tests/tc_facade
Started
Finished in 28.813341245 seconds.
---------------------------------------------------------------------------------------------------------------------------------------------
58 tests, 129 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
---------------------------------------------------------------------------------------------------------------------------------------------
2.01 tests/s, 4.48 assertions/s
But the command ruby tests/tc_*.rb does not run any more tests than the existing ruby tests/tc_augeas.rb
Can I suggest we make the %check section run rake test instead, as this seems to include all the required *.rb files
> rake test
Loaded suite /usr/share/gems/gems/rake-13.0.6/lib/rake/rake_test_loader
Started
Finished in 39.750812877 seconds.
---------------------------------------------------------------------------------------------------------------------------------------------
79 tests, 208 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
---------------------------------------------------------------------------------------------------------------------------------------------
1.99 tests/s, 5.23 assertions/s
Regards, George
But the command
ruby tests/tc_*.rbdoes not run any more tests than the existingruby tests/tc_augeas.rb
Interesting, I didn't count the tests. I'll take a further look
Can I suggest we make the %check section run
rake testinstead, as this seems to include all the required *.rb files
That does add another build dependency. Probably not a big deal, but worth considering.
Which build dependency is added by introducing rake test to the spec file?
rake is already used to build the package.
Oh right, you copied the spec file before I rewrote it. In Fedora it's now a pure gem install because the tarballs aren't published to http://download.augeas.net/ruby/ anymore. There I no longer depend on rake.
There is no existing https version of download.augeas.net, so I have started putting the tarballs on github instead https://github.com/hercules-team/ruby-augeas/releases
Good to know, but at this point I don't see a lot of benefit of treating it as anything else than a regular gem in Fedora.