Links
Assert valid asset
Categories
Assert valid asset
assertvalidasset is a plugin to validate your (X)HTML and CSS using the W3C Validator web service (http://validator.w3.org/) and the W3C CSS Validation Service (http://jigsaw.w3.org/css-validator) as part of your functional or unit tests. The css and html fragments are cached in $RAILS_ROOT/tmp/test/assets as are the results from the web service. This means that your tests will not be slowed down unless the output has changed.
The code started life as a few modifications to Scott Raymond's assertvalidmarkup (http://redgreenblu.com/svn/projects/assertvalidmarkup/) and evolved to cache fragments and results in $RAILS_ROOT/tmp/test/assets rather than the system temp directory. Then the ability to validate CSS files was added. I also added the ability to skip checks if the "NONET" environment variable is set to "true".
Vitals
| Home | http://www.realityforge.org/articles/2006/03/15/rails-plugin-to-validate-x-html-and-css |
|---|---|
| Repository | http://www.realityforge.org/svn/public/code/assert-valid-asset/trunk/ |
| License | Rails' (MIT) |
| Tags |
|
| Rating | (4 votes) |
| Created | 14 April 2006 |

