# Markup\_validity 1.1.0 Released

**URL:** <https://www.ruby-forum.com/t/markup-validity-1-1-0-released/173342>\
**Category:** Ruby\
**Created:** [August 7, 2009, 4:47am UTC](https://www.ruby-forum.com/t/markup-validity-1-1-0-released/173342 "2009-08-07T04:47:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [August 7, 2009, 4:47am UTC](https://www.ruby-forum.com/t/markup-validity-1-1-0-released/173342/1 "2009-08-07T04:47:41Z")

</div>

markup\_validity version 1.1.0 has been released!

- [http://github.com/tenderlove/markup\_validity](http://github.com/tenderlove/markup_validity)

MarkupValidity provides test/unit and rspec helpers for checking the  
validity  
of your documents. Shortcuts for verifying xhtml-transitional and  
xhtml-strict documents are provided as well. MarkupValidity will not  
only  
tell you when your document is invalid, but it will tell you what it  
_should_  
be.

Changes:

### 1.1.0 / 2009-08-06

- New Features

- Bugfixes

## SYNOPSIS:

### 

# test/unit example

require ‘test/unit’  
require ‘rubygems’  
require ‘markup\_validity’

class ValidHTML \< Test::Unit::TestCase  
def test\_i\_can\_has\_valid\_xhtml  
assert\_xhtml\_transitional xhtml\_document  
end  
end

### 

# rspec example

require ‘rubygems’  
require ‘markup\_validity’

describe “my XHTML document” do  
it “can has transitional xhtml” do  
xhtml\_document.should be\_xhtml\_transitional  
end  
end

### 

# Rails controller test example

require ‘test\_helper’  
require ‘markup\_validity’

class AwesomeControllerTest \< ActionController::TestCase  
test “valid markup” do  
get :new  
assert\_xhtml\_transitional @response.body  
end  
end

### 

# Here is an example error report

Error on line: 7:  
Element ‘p’: This element is not expected. Expected is one of ( a, br,  
span, bdo, object, applet, img, map, iframe, tt ).

6:

7:

8: Yo dawg, I heard you like p-tags  
9:

  
10: 

  
.  
 is not true.

## REQUIREMENTS:

- depends on nokogiri

## INSTALL:

- gem install markup\_validity
