Rails 2: test 'link_to' and other view helpers from the rails console?
Just a small addition. You will need to provide the host parameter too e.g
my_random_link_helper(:host => "www.google.com")
just include the UrlWriter module in your console:
include ActionController::UrlWriter
You can add your include ActionView::Helpers::UrlHelper
to ~/.irbrc to auto load it when you start the console.