Skip to content

Instantly share code, notes, and snippets.

@mrkurt
Created October 9, 2009 14:01
Show Gist options
  • Save mrkurt/206049 to your computer and use it in GitHub Desktop.
Save mrkurt/206049 to your computer and use it in GitHub Desktop.
ENV['ARS_ENV'] ||= 'development'
require 'rubygems'
require 'webrat'
require 'webrat/mechanize'
require 'spec'
class MechanizeWorld
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