Skip to content

Instantly share code, notes, and snippets.

@camiloribeiro
Forked from peterkappus/capirb.txt
Created October 10, 2012 14:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camiloribeiro/3865886 to your computer and use it in GitHub Desktop.
Save camiloribeiro/3865886 to your computer and use it in GitHub Desktop.
Capybara in IRB
# copy and paste this into your terminal to start an IRB session and use Capybara's DSL to write tests interactively
# Thanks to Tom Clements
# http://tom-clements.com/blog/2012/02/25/capybara-on-the-command-line-live-browser-testing-from-irb/
irb
require 'capybara/dsl'
include Capybara::DSL
Capybara.default_driver = :selenium
visit "http://127.0.0.1:3000"
visit "http://www.google.com" #etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment