Setting the host in a functional test

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs