4 ms·
The test culture of Ruby helps a bit... Uh, right. Ruby folks have no idea how little of a test culture they have. Doesn't stop them from complimenting thems
by btilly 16y ago
The test culture of Ruby helps a bit...
Uh, right. Ruby folks have no idea how little of a test culture they have. Doesn't stop them from complimenting themselves though. What, you say, why do I say this about Ruby? Consider the following facts.
- Ruby itself has fairly bad unit tests.
- By default you don't run tests on gems when you install them.
- Many gems that have tests, have tests that only make sense on the developer's machine and can't easily be run elsewhere.
- There is no automated process for identifying which gems are doing a standard list of good things (have documentation, tests, clear license terms, properly identified dependencies...) and which are not.
- There is no easy way for someone with a spare box and an interesting environment to contribute their machine to tracking down which gems fail their tests in your environment.
If you're a Ruby developer, you may be saying, "This sounds like a nice wish list, but look at everything we do..." Stop right there. Everything on this list, the Perl community has been doing for years. And Perl folks are doing all of the other good things that you were going to talk about.
In fact the state of the art of Ruby's "test culture" does not even match the test culture among good Perl developers during the last millenium. You don't believe me? The standard CPAN client has defaulted to actually running unit tests since Perl 5 was released in the mid-90s. And the core Perl test suite back then was much more comprehensive than Ruby's is now.
But there is good news. It is easier to copy someone else's working thing than it is to write your own in the first place. Perl got this working several years ago, and has had time to iron out the kinks. If you are interested, feel free to copy.
- joevandyk 16y agoHave you seen http://www.rubyspec.org/ http://www.rubyspec.org/?
- btilly 16y agoI had not. But it doesn't seem to be up right now.
- deleted 16y ago[deleted]
- njonsson 16y agohttp://test.rubygems.org http://test.rubygems.org addresses all your concerns related to RubyGems, except that it’s an opt-in thing — you must configure RubyGems to run tests upon gem installation, and the results are optionally uploaded for use by the gem author. A pearl from Perl, of course.
- btilly 16y agoThat is nice. It is too bad that it is opt-in. And it doesn't immediately fix the problem that some authors write tests for themselves only. But it is definitely a good step in the right direction.