Skip to content

Instantly share code, notes, and snippets.

@movstox
Forked from nikhgupta/standalone-capybara.rb
Created April 6, 2018 09:00
Show Gist options
  • Save movstox/67a11967ba0c02924fb5ab16d172f7de to your computer and use it in GitHub Desktop.
Save movstox/67a11967ba0c02924fb5ab16d172f7de 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