# Which test framework do you use?

**URL:** <https://www.ruby-forum.com/t/which-test-framework-do-you-use/156779>\
**Category:** Rails\
**Created:** [January 2, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/which-test-framework-do-you-use/156779 "2009-01-02T20:25:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wycats](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/eb9ed0/32.png) [@wycats](https://www.ruby-forum.com/u/wycats)\
**Post date:** [January 2, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/which-test-framework-do-you-use/156779/1 "2009-01-02T20:25:13Z")

</div>

In the interest of collecting some demographic information on the  
community, Matt (Aimonetti, Rails evangelist) put together a poll of  
testing framework usage.

Please vote at [Twtpoll](http://twtpoll.com/zhh2fm). Thanks!

---

<div class="post-metadata">

**Author:** ![wycats](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/eb9ed0/32.png) [@wycats](https://www.ruby-forum.com/u/wycats)\
**Post date:** [January 2, 2009, 8:45pm UTC](https://www.ruby-forum.com/t/which-test-framework-do-you-use/156779/2 "2009-01-02T20:45:40Z")

</div>

Yehuda K. wrote:

> In the interest of collecting some demographic information on the  
> community, Matt (Aimonetti, Rails evangelist) put together a poll of  
> testing framework usage.
> 
> Please vote at [http://twtpoll.com/zhh2fm](http://twtpoll.com/zhh2fm). Thanks!

Assert{ 2.0 } makes test/unit competitive with any of those literate  
systems.

[Plug!] Here’s what the latest (unreleased) version can do. This is an  
XPath  
test using Java and some Brand-X framework:

assertThat(  
document,  
hasTextAtXPath(“//div[@id=‘info’]//p[id=‘name’]”,  
containingString(“Bob Jones”)));

Here’s the equivalent, with the XPath converted into a lite Ruby DSL:

assert\_xhtml document

assert do  
xpath :div, :info do  
xpath :p, :name, ?. =\> ‘Bob Jones’  
end  
end

Among other benefits, it handles escapes and naughty characters in the  
string  
payloads correctly. And if the inner xpath fails, its diagnostic only  
contains  
the

…
 - not the entire containing document!

–  
Phlip
