Testing a domain driven application

in the application i’m working on i modify the view_path according to
the value of request.domain.
it seems to work, but my functional test fail.
how can i specify the request.domain value in the testing environment?