def test_contains_only_a_tag
re = /.*<.*>.*/
assert( ('<tag>' =~ re))
assert(!('<tag' =~ re))
assert(!('tag>' =~ re))
assert(!('tag' =~ re))
assert(!('' =~ re))
assert(!(' ' =~ re))
assert( (' < t a g > ' =~ re))
assert(!('<t>a<g>' =~ re))
end
My re passes them all except the last one, which is the one I need help
with. Any takers? :)
Chris Morris
chris.morris / snelling.com