Matchers for Rspec2 to validate Rails views locally using Nokogiri.
Add this line to your application's Gemfile:
gem 'html_validator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install html_validator
describe UsersController do
render_views
describe "GET show" do
before { get :show }
it { response.should be_valid_xhtml }
end
end
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request