I have a question about the best practise in naming Ruby modules.
I am working on a module for unit testing XML documents (and document
fragments). It would be logical, I think, to name the module
Test::Unit::XML, and to load it using “require ‘test/unit/xml’”.
However, this naming scheme could cause problems. For example, if the
core unit test package is extended with assertions for testing XML.
Also, even if my xml.rb file is physically separate from the files in
the core test/unit directory, I don’t feel comfortable with the possible
overlap in names.
I could of course change the names:
or I could do something like this:
However, I neither of these alternatives is as appealing.
What is the recommended Ruby practise in these cases?
I plan to release the module, whatever its name, on RubyForge as soon as
the naming issue has been resolved.
http://www.henrikmartensson.org/ - Reflections on software development