Dne 8.8.2013 17:37, Roman Neuhauser napsal(a):
hola!
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 http://rubydoc.info/gems/minitest/frames * rspec http://rspec.info/ * shoulda http://rubydoc.info/gems/shoulda/frames * Test::Unit http://www.ruby-doc.org/stdlib-1.9.3/libdoc/test/unit/rdoc/Test/Unit.html
see https://en.wikipedia.org/wiki/Unit_testing_frameworks_for_Ruby 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 them, 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 maintainers 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 lslezak@suse.com SUSE -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org