1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

Merge pull request #901 from saks/fix_missing_server_option

use proper options to create connection object
This commit is contained in:
Matthew Horan 2016-04-08 07:50:03 -04:00
commit 01f5202e1b
2 changed files with 10 additions and 1 deletions

View file

@ -13,7 +13,7 @@ module Capybara::Webkit
@app = app
@options = options.dup
@options[:server] ||= Server.new(options)
@browser = options[:browser] || Browser.new(Connection.new(options))
@browser = options[:browser] || Browser.new(Connection.new(@options))
apply_options
end

View file

@ -16,6 +16,15 @@ describe Capybara::Webkit::Driver do
"#{AppRunner.app_host}#{path}"
end
context "configuration" do
let(:options) { AppRunner.configuration.to_hash }
it "configures server automatically" do
expect { Capybara::Webkit::Driver.new(AppRunner.app, options) }.
to_not raise_error
end
end
context "iframe app" do
let(:driver) do
driver_for_app do