It's definitely a webrat issue with the redirects. They appear to have
a fix, but haven't yet released it:
https://github.com/brynary/webrat/pull/46
I was banging my head against the brick wall yesterday, then I found
the above link, and it looks like they posted a fix just after I
decided to put it on the back burner for the day. After a bit of
googling, I came up with a fix for redirections after sign up, but
signing in has been problem - my code is good, but my tests fail.
This is the fix they posted yesterday for cucumber:
In features/support/webrat_host_fix.rb
Webrat::Session.class_eval do
def current_host
URI.parse(current_url).host || @custom_headers["Host"] ||
default_current_host
end
def default_current_host
adapter.class == Webrat::RackAdapter ? "
example.org" :
"
www.example.com"
end
end
I ad cobbled together a few different solutions, but having just
dropped that file in, it appears to have immediately fixed the
redirect after sign up. If the above on it's own isn't enough for you,
post back and I'll detail what I did leading up to this point.
(If I hadn't seen you're question, I wouldn't have gone back to the
github page so soon, and wouldn't haven't have found the patch :) )
Hopefully, they'll release the full fix release soon....
Paul