Disable the automatic following of redirects in the Mechanize instance so they can be handled by Webrat::Session
This commit is contained in:
parent
d9d9cc1fcc
commit
b2dddf2f09
|
@ -40,7 +40,11 @@ module Webrat #:nodoc:
|
||||||
end
|
end
|
||||||
|
|
||||||
def mechanize
|
def mechanize
|
||||||
@mechanize ||= WWW::Mechanize.new
|
unless @mechanize
|
||||||
|
@mechanize = Mechanize.new
|
||||||
|
@mechanize.redirect_ok = false
|
||||||
|
end
|
||||||
|
@mechanize
|
||||||
end
|
end
|
||||||
|
|
||||||
def_delegators :mechanize, :basic_auth
|
def_delegators :mechanize, :basic_auth
|
||||||
|
|
Loading…
Reference in New Issue