[rspec-users] There is a easy way to valid markup?

Hans de Graaff hans at degraaff.org
Fri Sep 28 01:55:11 EDT 2007

On Thu, 2007-09-27 at 16:07 -0400, Edgar Gonzalez wrote:
> Do I have to create a custom Expectation Matcher?
> or there is a way to integrate assert_valid_asset plugin?
> thx

I'm using this expectation to check for valid XHTML using a locally
installed copy of tidy: http://pastie.caboo.se/101660

In my controller tests I'm including something like

it 'should be a valid XHTML page' do
  get :index
  response.should be_xhtml

Note the :show option also. Tidy outputs its errors with the line
numbers which can be a pain to track down. Using bx_xhtml(:show => true)
will first show the generated code and then the tidy warnings.

Kind regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://rubyforge.org/pipermail/rspec-users/attachments/20070928/55f12899/attachment.bin 

More information about the rspec-users mailing list