[rspec-users] How to define request.domain in when testing
Jarkko Laine
jarkko at jlaine.net
Wed Sep 24 06:12:48 EDT 2008
On 24.9.2008, at 12.51, Fernando Perez wrote:
> Hi,
>
> My application relies on request.domain for doing its job. The
> problem I
> am encountering, is that when running tests, request.domain returns
> "test.host", how can I change that so that it returns "mysite.com"?
Set this somewhere in your test environment:
ActionController::Base.default_url_options.update :host =>
'mysite.com'
//jarkko
--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi
More information about the rspec-users
mailing list