Permalink
Browse files

The WWW namespace is deprecated as of Mechanize 1.0.

[#368 state:resolved]
  • Loading branch information...
1 parent deccefa commit 4c62279fc1e7b7305a8726aefe20526ba2b63254 @djanowski djanowski committed Apr 13, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/webrat/adapters/mechanize.rb
@@ -4,6 +4,8 @@ module Webrat #:nodoc:
class MechanizeAdapter #:nodoc:
extend Forwardable
+ Mechanize = WWW::Mechanize if defined?(WWW::Mechanize)
+
attr_accessor :response
alias :page :response
@@ -40,7 +42,7 @@ def response_code
end
def mechanize
- @mechanize ||= WWW::Mechanize.new
+ @mechanize ||= Mechanize.new
end
def_delegators :mechanize, :basic_auth

0 comments on commit 4c62279

Please sign in to comment.