Mailinglist Archive: yast-devel (144 mails)

< Previous Next >
Re: [yast-devel] unit tests for yast modules written in ruby
Dne 8.8.2013 17:37, Roman Neuhauser napsal(a):

vlado brought up an interesting topic, namely the choice of a
unit-testing framework. there's a bunch of them written for ruby code,
some of the most popular ones (presented in no particular order) are:

* minitest
* rspec
* shoulda
* Test::Unit

for a pretty good overview.

i have no strong preference or dislike for any of them,
with the exception of rspec, which creates methods on the CUT
(to be clear: i don't like that).

I do not have any strong preference, I only know the test-unit + mocha which
we already use in Webyast and SLMS. (SLMS in addition to this uses factory_girl,
but Yast does not need any DB mocking so it's irrelevant here...)

but before we dive into a massive flamewar re: which one is the best,

I don't think there will be a flamewar as Yast developers do not know any of
and the legacy Yast testing framework (expects + dejagnu) works completely
differently (and looks weird from Ruby perspective)...

there's another topic to chew on: do we need to standardize this at all?

Having a common standard in all Yast packages should be preferred. Yast
maintainers change quite often, some modules are moved or changed between
etc.. More frameworks also mean more maintenance effort
(to package them to RPMS).

And if you want to send a patch to someone else's module you don't need to learn
a new testing framework just because of adding a single test case.

Also this would make automatic checks easier (e.g. in Jenkins you don't have
to care which gem/packages are needed, how to run the tests in a particular
Yast package etc...)

But if a different framework is more suitable in a special case it should be
fine to use it, there should be no dogma.


Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups