Skip to content

Instantly share code, notes, and snippets.

@cmeiklejohn
Created May 17, 2011 23:11
Show Gist options
  • Save cmeiklejohn/977624 to your computer and use it in GitHub Desktop.
Save cmeiklejohn/977624 to your computer and use it in GitHub Desktop.
minimal capybara use outside of rails
require 'rubygems'
require 'capybara'
require 'capybara/dsl'
require 'capybara-webkit'
Capybara.run_server = false
Capybara.current_driver = :webkit
Capybara.app_host = 'http://www.google.com'
module MyCapybaraTest
class Test
include Capybara
def test_google
visit('/')
end
end
end
t = MyCapybaraTest::Test.new
t.test_google
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment