[rspec-users] Testing Sub-domains with Cucumber

Matt Wynne matt at mattwynne.net
Wed Jan 14 03:41:34 EST 2009


On 14 Jan 2009, at 01:46, Tom Hoen wrote:

> 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.


Are we on rails here, or something else? You might be better asking on  
the webrat list (google group - check the webrat readme for details)  
or IRC, to be honest.

Matt Wynne
http://blog.mattwynne.net
http://www.songkick.com



More information about the rspec-users mailing list