[rspec-users] Testing Sub-domains with Cucumber

Tom Hoen lists at ruby-forum.com
Tue Jan 13 20:46:21 EST 2009

My site uses sub-domains to create a context for the user. In my tests,
I need to stipulate what domain is being used, to test whether the
context is correct for the given user.

But I cannot find if and where i can change the request.host value, if
indeed, that is what I need to change.

When I say 'visits "/login"' in a step, I want it to have know to go to
harvey.localhost:3000 for this feature/scenario. In another
feature/scenario, I will want it to go to humbel.localhost:3000 etc.

What would you suggest.

All the best,
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list