Skip to content

Instantly share code, notes, and snippets.

@nikhgupta
Created March 23, 2012 21:12
Show Gist options
  • Save nikhgupta/2175097 to your computer and use it in GitHub Desktop.
Save nikhgupta/2175097 to your computer and use it in GitHub Desktop.
Standalone Capybara Test
require 'rubygems'
require 'capybara'
require 'capybara/dsl'
Capybara.run_server = false
Capybara.current_driver = :selenium
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