Skip to content

Instantly share code, notes, and snippets.

@aslakhellesoy
Forked from anonymous/gist:206052
Created October 9, 2009 14:20
Show Gist options
  • Save aslakhellesoy/206058 to your computer and use it in GitHub Desktop.
Save aslakhellesoy/206058 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'webrat'
require 'webrat/mechanize'
require 'spec'
class MechanizeWorld < Webrat::MechanizeSession
include Spec::Matchers
include Webrat::Methods
include Webrat::Matchers
def response
webrat_session.response
end
end
World do
MechanizeWorld.new
end
# Tells Webrat to use Mechanize to do the actual HTTP work
Webrat.configure do |config|
config.mode = :mechanize
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment