Paul B. wrote: > This is a great idea, I'm going to give it a try. Does anyone know if > there is a way to accomplish this wthout having to send an HTTP request > to w3.org <http://w3.org>? It would be nice to write functional test > that will pass even when you're not connected to the internet. Is there > a ruby xhtml validation library? The assert_valid_markup plugin now catches SocketError exceptions, so that the assertion will pass if there's temporarily no connection. Plus, it caches responses from the W3C validator, so it only makes a connection if the markup has changed. It also has class-level methods, so you can do things like: class FooControllerTest < Test::Unit::TestCase assert_valid_markup :home_page, :another_page assert_valid_markup :some_private_page, :but_first => :login end The plugin lives here: http://redgreenblu.com/svn/projects/assert_valid_markup/ As such, this should install it for you: script/plugin install http://redgreenblu.com/svn/projects/assert_valid_markup Scott R.
on 2006-01-30 19:44