You can build XHTML and CSS validation right into your Ruby on Rails Rspec tests - thanks to a plugin called be_valid_asset.
Combine this with autotest and voila - you can be alerted the moment you change something in the view code that breaks your site’s valid markup.
Take this one step further and add your tests into your Capistrano deployment script - and you literally cannot deploy your site when it is in a state that is not standards-compliant.
Get started by installing the be_valid_asset gem (or plugin), and inserting the following line into your Rspec spec_helper.rb file:
config.include BeValidAsset


