« return

Cucumber / webrat not following redirects between multiple domains.

08-Dec-2009, Ant

When you need to test using multiple domains in one app and you need to redirect between those domains Webrat does not follow the redirects as it considers them to be a redirect to an external app.

A fix is to set the following in your support/env.rb file so that internal_redirect? returns true in such a case.  Of course if you are actually redirecting to an external app it might cause other issues.

class Webrat::Session
  alias internal_redirect? redirect?