I used the following code to test using Capybara with IE8 in pure Ruby, that is, NOT a rail application, but every time I run the IE8 script it pops up and then Firefox pops up and the tests go through Firefox leaving IE8 sitting in the background:
$:.unshift(File.dirname(__FILE__) + '/../../lib') begin require 'rspec/expectations'; rescue LoadError; end require 'rubygems' require 'capybara' require 'capybara/dsl' Capybara.run_server = false Capybara.app_host = 'http://www.google.com' require 'selenium-webdriver' Selenium::WebDriver.for :internet_explorer Capybara.default_driver = :selenium require 'cukesalad' begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
source share