Forum: Ruby on Rails setting the host in a functional test

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
6d993d4e32992c2992d0e85e8dde8a90?d=identicon&s=25 John Ward (johnward)
on 2007-01-17 21:16
(Received via mailing list)
I have code that pulls out a google api key from the database depending
on the host. This allows me to have separate dev, test, and prod

I'm writing a test to check the key used, but in order to do so I need
to simulate the request is coming from,,
or localhost as the keys are keyed on the domain.

Does anyone know how to do this?

Thanks in advance,
This topic is locked and can not be replied to.