Created
September 24, 2010 20:35
-
-
Save ivanacostarubio/595994 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
| in Gemfile: | |
| gem 'w3c_validators' | |
| in spec/support/w3c_validator.rb: | |
| include W3CValidators | |
| def validate_url(url) | |
| visit url | |
| result = MarkupValidator.new.validate_text(page.body) | |
| result.errors.should == [] | |
| end | |
| in spec/acceptance/w3c_valid_spec.rb: | |
| require File.dirname(__FILE__) + '/acceptance_helper' | |
| feature "W3C Validation" do | |
| before :all do | |
| Capybara.use_default_driver | |
| Capybara.run_server = true | |
| end | |
| scenario "HTML" do | |
| validate_url '/' | |
| end | |
| # scenario "feed XML" do | |
| # end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment