[rspec-users] Selenium, Spec:Ui and ... forks?

Marcus Ahnve marcus at ahnve.com
Tue May 29 09:42:44 EDT 2007

I am using Spec:UI to run my Selenium tests, and I want to start
Selenium only once, for many descriptions.

I've come quite far solving it by declaring a main ui spec like the following:

require 'pathname'
require File.dirname(__FILE__) + '/selenium'

$browser = Selenium::SeleniumDriver.new("localhost", 4444, "*firefox",
"http://localhost:3000", 10000)

do |file|
  require file

$browser.kill! rescue nil

The problem is that the browser is killed before the specs are run.
Anyone has an idea why this is happening?

On a related sidenote, a listener interface in RSpec would be quite
nice, could the Spec::Runnner::Reporter be used for that?


Cheers /Marcus

More information about the rspec-users mailing list