Re: automated markup validation

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 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

The plugin lives here:

As such, this should install it for you:

script/plugin install

Scott R.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs