Skip to content

Instantly share code, notes, and snippets.

@raldred
Created November 4, 2009 15:16
Show Gist options
  • Save raldred/226121 to your computer and use it in GitHub Desktop.
Save raldred/226121 to your computer and use it in GitHub Desktop.
require 'spec/expectations'
require 'rack/test'
require 'webrat'
require 'ruby-debug'
Webrat.configure do |config|
config.mode = :selenium
#optional:
config.application_port = 4555 # defaults to 3001. Avoid Selenium's default port, 4444
config.application_framework = :sinatra # could also be :merb. Defaults to :rails
end
module MyWorld
include Webrat::Methods
include Webrat::Selenium::Methods
include Webrat::Selenium::Matchers
def peek_body(body)
pp body
end
end
World(MyWorld)
require File.dirname(__FILE__) + '/../../app'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment