# Assert\_template :partial don't work

**URL:** <https://www.ruby-forum.com/t/assert-template-partial-dont-work/162739>\
**Category:** Rails\
**Created:** [March 13, 2009, 10:14am UTC](https://www.ruby-forum.com/t/assert-template-partial-dont-work/162739 "2009-03-13T10:14:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9fc348/32.png) [@bobm](https://www.ruby-forum.com/u/bobm)\
**Post date:** [March 13, 2009, 10:14am UTC](https://www.ruby-forum.com/t/assert-template-partial-dont-work/162739/1 "2009-03-13T10:14:43Z")

</div>

Hi, following the documentation at  
[http://api.rubyonrails.org/classes/ActionController/Assertions/ResponseAssertions.html#M000543](http://api.rubyonrails.org/classes/ActionController/Assertions/ResponseAssertions.html#M000543)  
assert\_template should accept :partial options

eg. assert\_templace :partial =\> ‘\_foo’

But, here with Rails 2.2.2, I get an error  
TypeError: wrong argument type Hash (expected Regexp)

Am I the only one to have this problem ?

---

<div class="post-metadata">

**Author:** ![bobm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9fc348/32.png) [@bobm](https://www.ruby-forum.com/u/bobm)\
**Post date:** [March 13, 2009, 11:09am UTC](https://www.ruby-forum.com/t/assert-template-partial-dont-work/162739/2 "2009-03-13T11:09:50Z")

</div>

The documentation appears to be incorrect, Rails 2.2.2 expects the name  
of  
the template (or regexp) as the first arg.

I suspect the documentation relates to Rails 2.3. Can someone confirm  
this?

Is there any way of determining which version of Rails the docs in  
[api.rubyonrails.org](http://api.rubyonrails.org) relate to?

2009/3/13 Bob M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
