Using mechanize is easy, just make World be a MechanizeAdapter (renamed from MechanizeSession in e4ea9134a72191c70d37205d8d4533cbc894154e ) with the matchers you want mixed in.
Don’t forget to change your visit argument to point to a fully qualified server you want to hit, and make sure that the server is actually running (e.g. something on localhost on a certain port).
Webrat.configure do |config|
config.mode = :mechanize
class MechanizeWorld < Webrat::MechanizeAdapter
# no idea why we need this but without it response_code is not always recognized
Webrat::Methods.delegate_to_session :response_code, :response_body
# this is needed for webrat_steps.rb
2011/02: The “World do” construct has been replaced by “World(MyModuleThatDoesIt)”