[Rubygems-developers] RubyGems Alpha II?
Chad Fowler
chad at chadfowler.com
Tue Mar 30 19:44:59 EST 2004
Hi. I'm rushing between meetings, so I'll just say that all of the
responses to this thread have been great and will send more of an update
later. Inlined comments on this part below:
On Tue, 30 Mar 2004, Jim Weirich wrote:
#
# Mauricio Fernández said:
# > Not a feature but something I think would be good to consider before a
# > release: testing.
# >
# > After a cvs update -dPR, this is what I'm getting when running
# > test_all.rb:
# >
# > 52 tests, 49 assertions, 2 failures, 3 errors
#
I absolutely agree with Mauricio on this. I prefer test-first, but we
haven't been doing a great job of that since RubyConf. I actually wanted
to open this topic for discussion but have been travelling too much.
# Wow, that's more tests than when I looked last time. Someone has been busy!
#
:) Very modest start, but I have been trying.
# But I agree with Batsman, a carefully designed suite of unit tests will
# help use in the long run as code is changing. But we need a good
# commitment from the developers to keep the unit tests up to date and
# current.
#
# Some test issues. Currently, the tests do not do a good job of separating
# the installed code from the code in the working directory. Ideally, the
# unit tests should work only on the code in the working directory. I just
# tried the tests and got the 2 failures/3 errors listed above. Then I
# installed the working directory code and errors went down to 1 (apparently
# expected) failure. This tells me we are testing the installed stuff.
#
# We can correct that through careful use of the -I directive when you start
# the tests.
I've been using -I. My rake is in a state of flux, because I've been
using it to experiment with the application installation functionality.
That's why I haven't been using the Rake functionality like I should.
When I'm in one place for a while, I'll make sure I use Rake correctly. I
agree with your comment below that test_all.rb shouldn't even be
necessary, assuming Rake is insatlled. I would actually be in favor
(without giving it much thought) of making gem -Ri rake be part of
install.rb's job (optionally). Thoughts?
#
# Another issue. There is a test target in the provided rake file. Just
# type "rake" and it will automatically run the unit tests. However, it
# looks for files beginning with "test_" in the test directory, so the
# "test_all" file gets run as well. Changing that the name of that file to
# something like "run_all_tests.rb" will fix that (but then again, you
# really don't need test_all.rb if you use rake ... you do have rake don't
# you? ... hint: gem -Ri rake :-)
#
# And one last issue. Unit tests are well and good, but even XP recommends
# a functional level of testing. At this level you would actually run the
# code from the command line a making sure things installed correctly or the
# proper listing was made. Kind of an end-to-end test of the entire
# program. I was thinking about using the Ara's session module to do some
# command line testing at this level. Any opinions? Does anyone else feel
# this is worthwhile?
#
#
I very much feel like it's worthwhile. I'm specifically interested in
your opinions (Jim and Mauricio in particular) in how to test some of the
stuff that is currently hard to test. For example, George's patch has
really improved the remote-install code, but at the same time has made it
slightly more hairy to mock out. So, our remote_install.rb tests right
now are quite outdated.
I'm in favor of following Gavin's suggestion of freezing features and
focusing on cleaning and documentation. Part of this would/could
obviously be getting our testing act together. Once we've got a solid
suite of tests, it will be easier for us to keep it current...the ole
"Broken Windows" effect in play.
I'm not convinced that we should wait as long as 3 or 4 weeks for Alpha
II. I think with a project like this we need to tighten the feedback loop
with the community as much as possible. We really need to take
the "release early--release often" mantra to heart if we want to get the
mindshare that it will take for this to become *the* way to package
ruby libraries. We all know Ruby needs that.
I like Simon's patch for what it is, but I'm still a little skeptical
about "require" modifying the load path. Any other strong opinions? Mine
isn't strong.
Chad
More information about the Rubygems-developers
mailing list