In functional test, assert_redirected_to w prefix

I had to use sub-URI deployment (could not use subdomains…), and when
running my functional tests, I the redirected_to assertion embed the
prefix… quite normal ;-))

is there a way to stipulate this prefix in the test setup to avoid
hard-coding in all the tests ?

Expected response to be a redirect to http://test.host/my/page
but was a redirect to http://test.host/intranet/my/page

/intranet being the prefix in this case …

many thanks for your suggestions

erwin

Kad K. wrote:

I had to use sub-URI deployment (could not use subdomains…), and when
running my functional tests, I the redirected_to assertion embed the
prefix… quite normal ;-))

is there a way to stipulate this prefix in the test setup to avoid
hard-coding in all the tests ?

Expected response to be a redirect to http://test.host/my/page
but was a redirect to http://test.host/intranet/my/page

/intranet being the prefix in this case …

many thanks for your suggestions

erwin

solved it , wrote in my test :
ActionController::Base.relative_url_root = ‘intranet’