Here is an enahnced version of Scott Raymond’s assert_valid_markup
plugin that I use in my projects. Below are the directions for use;
HowTo Validate (X)HTML
HowTo Validate CSS
Most of the credit for this plugin goes to Scott for the initial idea! The modifications that I made include;
- Validation of CSS files.
- Caching of fragments occurs in
$RAILS_ROOT/tmp according to the name of the test class + test method. This avoids filling up the system temp folder with expired cache files.
- Ability to turn off validation by setting the “NONET” environment variable to “true”.
Update 12th of May, 2010
The plugin is now available on GitHub. See the GitHub project page