Guard against fork being unavailable
Now the tests pass on all platforms on Travis.
This commit is contained in:
parent
9e1600f022
commit
9f57b60c1c
|
@ -20,8 +20,12 @@ describe Capybara::Selenium::Driver do
|
|||
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
|
||||
begin
|
||||
pid = fork { "child" }
|
||||
Process.wait2(pid)[1].exitstatus.should == 0
|
||||
rescue NotImplementedError
|
||||
# Fork unsupported (e.g. on JRuby)
|
||||
end
|
||||
|
||||
browser.quit
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue