Created
November 18, 2010 18:38
-
-
Save bmaland/705399 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class String | |
| def strip_entities | |
| self.gsub(/&#?[A-Za-z0-9]+;/, '') | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo gem install markup_validity | |
| echo 'config.gem "markup_validity"' >> $RAILS_ROOT/config/environments/test.rb | |
| # Thats it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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