Frisco Del Rosario wrote:
I like to test first. Is there a test framework for Shoes?
Cairo is "non-retained graphics". The first low-level step to testing that is to
retain those graphics!
Write a test case that uses snapshot{} around a method that populates a slot.
Then collect its returning SVG, and use assert_xml (from the assert_xpath gem)
to load its XML so assert_xpath calls can see it.
That system is not yet a framework. One would use assert_xpath to match each
Shoe special effect to a matching high-level assertion. But the important thing
about testing with XPath is you can write queries that skip over irrelevant
details, and see "around the corners" to verify relevant ones.
We do that all the time to TDD HTML. That was once considered as hard as
non-retained graphics to test! And note that Cairo itself uses its SVG and
similar back-ends, in its own unit tests...
--
Phlip