# ZenTest ViewTestCase vs params

**URL:** <https://www.ruby-forum.com/t/zentest-viewtestcase-vs-params/113859>\
**Category:** Rails\
**Created:** [September 5, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/zentest-viewtestcase-vs-params/113859 "2007-09-05T18:03:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [September 5, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/zentest-viewtestcase-vs-params/113859/1 "2007-09-05T18:03:23Z")

</div>

Railers:

Here’s a non-heinous view test, via the mental serenity that is ZenTest:

class FrogSpeciesViewTest \< Test::Rails::ViewTestCase  
def test\_species\_list  
frog = frogs(:Ollotis\_periglenes)  
locals = {  
:frog\_genera =\> Species.find\_all\_by\_genera(‘Bufo’)  
}  
render :partial =\> ‘partials/species\_list’, :locals =\> locals  
end  
end

So far so good. But what if we want to pass params in? We can’t seem  
to find a hook for them, and if we pass them as a local something  
blots them out. Any help?

–  
Phlip  
[http://www.oreilly.com/catalog/9780596510657/](http://www.oreilly.com/catalog/9780596510657/)
