Skip to content

Instantly share code, notes, and snippets.

@bmaland
Created November 18, 2010 18:38
Show Gist options
  • Select an option

  • Save bmaland/705399 to your computer and use it in GitHub Desktop.

Select an option

Save bmaland/705399 to your computer and use it in GitHub Desktop.
class String
def strip_entities
self.gsub(/&#?[A-Za-z0-9]+;/, '')
end
end
sudo gem install markup_validity
echo 'config.gem "markup_validity"' >> $RAILS_ROOT/config/environments/test.rb
# Thats it!
describe PackagesController do
integrate_views
it "should have an XHTML Strict compilant show page" do
get :show, :id => 1
response.body.should be_xhtml_strict
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment