Created
September 22, 2010 18:57
-
-
Save suhrawardi/592281 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$: << File.expand_path(File.dirname(__FILE__) + "/../support") | |
#$DEBUG = true | |
$ROOT_PATH = File.expand_path(File.dirname(__FILE__)) | |
require 'capybara' | |
require 'capybara/cucumber' | |
require 'spec' | |
# Remove this line if you don't want Cucumber Unicode support | |
require 'cucumber/formatter/unicode' | |
Capybara.run_server = false | |
Capybara.app_host = 'http://some.domain' | |
require 'selenium-webdriver' | |
Selenium::WebDriver.for :firefox | |
Capybara.default_driver = :selenium | |
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In | |
# order to ease the transition to Capybara we set the default here. If you'd | |
# prefer to use XPath just remove this line and adjust any selectors in your | |
# steps to use the XPath syntax. | |
Capybara.default_selector = :css |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This can be done a lot more simply now because Capybara bundles selenium-webdriver. It also default to using Firefox: