Created
September 18, 2012 06:39
-
-
Save pmeinhardt/3741625 to your computer and use it in GitHub Desktop.
interactive capybara session
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'irb' | |
require 'irb/completion' | |
require 'selenium/webdriver' | |
require 'capybara/dsl' | |
if ARGV.delete "--chrome" | |
chrome = true | |
end | |
Capybara.register_driver :chrome do |app| | |
Capybara::Selenium::Driver.new app, browser: :chrome | |
end | |
Capybara.configure do |config| | |
config.default_driver = chrome ? :chrome : :selenium | |
end | |
include Capybara::DSL | |
IRB.conf[:AUTO_INDENT] = true | |
IRB.conf[:PROMPT_MODE] = :SIMPLE | |
IRB.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
require 'rspec/expectations' would be a plus.