Do I have to create a custom Expectation Matcher? or there is a way to integrate assert_valid_asset plugin? thx -- Edgar Gonz?lez Gonz?lez --
On 9/27/07, Edgar Gonzalez <edgargonzalez at gmail.com> wrote:> Do I have to create a custom Expectation Matcher? > > or there is a way to integrate assert_valid_asset plugin? > > thx > -- > Edgar Gonz?lez Gonz?lez > -- > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >I''m sure you could hook into some kind of validator. I jumped on RubyForge and found http://rubyforge.org/projects/feedvalidator/. It kind of sucks because you''d depend on a web service for this...there have to be validators that you can run locally though, right? Pat
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? > > thxI''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 end 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, Hans -------------- 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
El 27/9/2007, a las 22:23, Pat Maddox escribi?:> I''m sure you could hook into some kind of validator. I jumped on > RubyForge and found http://rubyforge.org/projects/feedvalidator/. It > kind of sucks because you''d depend on a web service for this...there > have to be validators that you can run locally though, right?Tidy (also known as HTML Tidy) can do many kinds of validation. You may even find it preinstalled on your system: <http://tidy.sourceforge.net/> Cheers, Wincent