ZenTest ViewTestCase vs params

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/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs