# RE: url\_for in tests

**URL:** <https://www.ruby-forum.com/t/re-url-for-in-tests/61153>\
**Category:** Rails\
**Created:** [January 12, 2006, 9:04am UTC](https://www.ruby-forum.com/t/re-url-for-in-tests/61153 "2006-01-12T09:04:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jonny](https://www.ruby-forum.com/u/jonny)\
**Post date:** [January 12, 2006, 9:04am UTC](https://www.ruby-forum.com/t/re-url-for-in-tests/61153/1 "2006-01-12T09:04:09Z")

</div>

Mmmm not really…

include ActionView::Helpers::UrlHelper  
url\_for(:controller =\> ‘person’, :action =\> ‘view’, :id =\> 1)

gives a SystemStackError (too deep), and

ActionController::Base.new.url\_for() says that @url isn’t defined. Maybe  
I need to set up a controller and request/response object in the same  
way the functional tests do.

-Jonny.

---

<div class="post-metadata">

**Author:** ![jonny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jonny](https://www.ruby-forum.com/u/jonny)\
**Post date:** [January 17, 2006, 6:52pm UTC](https://www.ruby-forum.com/t/re-url-for-in-tests/61153/2 "2006-01-17T18:52:30Z")

</div>

I think the patch I just sent in might fix this for you:

[http://dev.rubyonrails.org/ticket/3517](http://dev.rubyonrails.org/ticket/3517)

CHEERS\> SAM
