From: Henrik Martensson Date: 2006-01-06T23:25:35+09:00 Subject: Re: What's the best practise in naming modules? On Fri, 2006-01-06 at 12:28, Robert Klemme wrote: > > Is this a general module for XML testing or is it a module for testing > specific XML? In the former case I'd contact project maintainers of > Test::Unit and discuss with them whether and how to integrate your code > into Test::Unit. In the latter case I would definitively avoid using > Test::Unit's namespace. In that case you should use the namespace of your > project along the lines of YourProject::Test::Xml or > YourProject::Test::XML. It is a generic framework. The goal is to write something along the lines of the XMLUnit extension to JUnit, but of course adapted to fit with Test::Unit and Ruby style programming. I am taking a minimalistic approach, and aim to follow the "release early, release often" mantra. The first version is extremely simple, with only an assert_xml_equal assertion. Namespaces are handled correctly, and extraneous whitespace is ignored for comparison purposes. There is as yet no support for comparing doctypes and entity declarations, or for validating documents. Nor is there any support for comparing structures while ignoring content and attributes, yet. Still, as it is right now, I believe I have covered the most common situations where you want to test well formed XML. One of the things I like very much about Ruby is the refreshing absence of XML configuration files. This is probably why no one has written an XML unit test framework yet. (At least, I haven't found one.) Still, XML tends to creep in just about everywhere. I hope more people than I will find the framework useful. /Henrik -- http://www.henrikmartensson.org/ - Reflections on software development