mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
25 lines
472 B
Ruby
25 lines
472 B
Ruby
require 'culerity'
|
|
|
|
class Capybara::Driver::Culerity < Capybara::Driver::Celerity
|
|
|
|
def self.server
|
|
unless @_server
|
|
@_server = ::Culerity::run_server
|
|
at_exit do
|
|
@_server.close
|
|
end
|
|
end
|
|
@_server
|
|
end
|
|
|
|
def browser
|
|
unless @_browser
|
|
@_browser = ::Culerity::RemoteBrowserProxy.new self.class.server, {:browser => :firefox, :log_level => :off}
|
|
at_exit do
|
|
@_browser.exit
|
|
end
|
|
end
|
|
@_browser
|
|
end
|
|
|
|
end
|