Sha256: 1d71ba2cd6cc5320237e31fc7854184992aecbb217eea9fce54ae22f22affe24

Contents?: true

Size: 980 Bytes

Versions: 3

Compression:

Stored size: 980 Bytes

Contents

require 'spec_helper'
require 'rbconfig'

describe Capybara::Selenium::Driver do
  before do
    @driver = TestSessions::Selenium.driver
  end

  it_should_behave_like "driver"
  it_should_behave_like "driver with javascript support"
  it_should_behave_like "driver with resynchronization support"
  it_should_behave_like "driver with frame support"
  it_should_behave_like "driver with support for window switching"
  it_should_behave_like "driver without status code support"
  it_should_behave_like "driver with cookies support"

  unless Config::CONFIG['host_os'] =~ /mswin|mingw/
    it "should not interfere with forking child processes" do
      # Launch a browser, which registers the at_exit hook
      browser = Capybara::Selenium::Driver.new(TestApp).browser

      # Fork an unrelated child process. This should not run the code in the at_exit hook.
      pid = fork { "child" }
      Process.wait2(pid)[1].exitstatus.should == 0

      browser.quit
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capybara-1.0.1 spec/driver/selenium_driver_spec.rb
capybara-1.0.0 spec/driver/selenium_driver_spec.rb
capybara-1.0.0.rc1 spec/driver/selenium_driver_spec.rb