Skip to content

Commit

Permalink
Disable the automatic following of redirects in the Mechanize instanc…
Browse files Browse the repository at this point in the history
…e so they can be handled by Webrat::Session
  • Loading branch information
wemrysi committed Feb 18, 2010
1 parent d9d9cc1 commit b2dddf2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/webrat/adapters/mechanize.rb
Expand Up @@ -40,7 +40,11 @@ def response_code
end

def mechanize
@mechanize ||= WWW::Mechanize.new
unless @mechanize
@mechanize = Mechanize.new
@mechanize.redirect_ok = false
end
@mechanize
end

def_delegators :mechanize, :basic_auth
Expand Down

0 comments on commit b2dddf2

Please sign in to comment.