what's the best way to change a subdomains for the duration of an integration test?
jamis buck suggested using host! here: http://weblog.jamisbuck.org/2006/3/9/integration-testing-in-rails-1-1#12
but according to the rails API, host! only changes the host for the following single request. i'm looking for something like @request.host in a functional test, which lets me use the subdomain for the entire test.
I'm using host! in my integration tests without a problem. I generally call it once in the setup method, e.g.
def setup
host! "my.host"
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With