require 'grid' require 'test/unit' require 'grid/extensions/capybara' #require 'capybara' #require 'capybara/dsl' #require 'selenium-webdriver' #module Capybara #module Grid #autoload :Node, 'lib/grid/extensions/capybara/node.rb' #autoload :Driver, 'lib/grid/extensions/capybara/driver.rb' #end #end Capybara.register_driver :grid do |app| options = {} options[:controller_uri] = 'druby://10.0.1.3:11235' options[:loglevel] = Logger::DEBUG Capybara::Grid::Driver.new(app, options) end class HelloWorldTest < Test::Unit::TestCase include Capybara Capybara.app_host = 'http://www.google.com' Capybara.default_driver = :grid Capybara.run_server = false def test_google visit '/' fill_in 'q', :with => 'gridinit' assert page.has_content?('results') end end