2011-10-27 23:34:14 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Capybara::Poltergeist::Driver do
|
|
|
|
before do
|
|
|
|
@driver = TestSessions::Poltergeist.driver
|
|
|
|
end
|
|
|
|
|
|
|
|
it_should_behave_like "driver"
|
|
|
|
it_should_behave_like "driver with javascript support"
|
|
|
|
it_should_behave_like "driver with frame support"
|
|
|
|
it_should_behave_like "driver without status code support"
|
|
|
|
it_should_behave_like "driver with cookies support"
|
|
|
|
|
|
|
|
it 'should support a custom phantomjs path' do
|
2011-10-28 00:37:06 +01:00
|
|
|
path = File.expand_path('../../support/custom_phantomjs', __FILE__)
|
2011-10-27 23:34:14 +01:00
|
|
|
|
2011-10-28 00:37:06 +01:00
|
|
|
driver = Capybara::Poltergeist::Driver.new(nil, :phantomjs => path)
|
|
|
|
driver.browser
|
2011-10-27 23:34:14 +01:00
|
|
|
|
2011-10-28 09:32:35 +01:00
|
|
|
`ps -o command=`.should include(path)
|
2011-10-27 23:34:14 +01:00
|
|
|
end
|
|
|
|
end
|