[PATCH] Need help to write a test

0 views
Skip to first unread message

Nicolas Cavigneaux

unread,
Jul 3, 2007, 3:01:49 PM7/3/07
to rubyonra...@googlegroups.com
I'm trying to write a test for a modification I've done on link_to
helper. The problem is that my patch is relying on url_for behaviour
defined in link_to helper.

In url_helper_test.rb test file url_for is overwrited for testing
convinience.

So my question is how can I do to test my modification using the real
url_for method (the one in url_helper.rb). Is there a way to load it
from the inside of my test or something like this?

Thank you in advance.
--
Nicolas Cavigneaux
http://www.bounga.org
http://www.cavigneaux.net

Pratik

unread,
Jul 3, 2007, 3:59:46 PM7/3/07
to rubyonra...@googlegroups.com
Check actionpack/test/template/url_helper_test.rb

Thanks,
Pratik


--
http://m.onkey.org

Nicolas Cavigneaux

unread,
Jul 4, 2007, 4:18:17 AM7/4/07
to rubyonra...@googlegroups.com

Le 3 juil. 07 à 21:59, Pratik a écrit :

>
> Check actionpack/test/template/url_helper_test.rb

That's the file in which I'm trying to write my test.

My question was : is it possible in my test method (in actionpack/
test/template/url_helper_test.rb) to use the real url_for()
implementation (the one in url_helper.rb file) rather than the one
implemented (for the sake of testing) in the test file.

I need to rely on the behaviour of url_for method implemented in
actionpack/lib/actionview/helpers/url_helper.rb. My modification
can't be tested without the original url_for implementation.

Any idea ?

Reply all
Reply to author
Forward
0 new messages