mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
519d90306b
Users were generally confused about where to configure things like allowed URLs. Because they were reset in between each sessions, they needed to be applied repeatedly in a before block. This introduces an API for global configuration, which will be applied for every session. It also deprecates the per-session configuration methods, as those are less likely to be useful.
16 lines
449 B
Ruby
16 lines
449 B
Ruby
require "spec_helper"
|
|
|
|
describe Capybara::Webkit::Configuration do
|
|
it "returns a hash and then prevents future modification" do
|
|
Capybara::Webkit.configure do |config|
|
|
config.debug = true
|
|
end
|
|
|
|
result = Capybara::Webkit::Configuration.to_hash
|
|
|
|
expect(result).to include(debug: true)
|
|
expect { Capybara::Webkit.configure {} }.to raise_error(
|
|
"All configuration must take place before the driver starts"
|
|
)
|
|
end
|
|
end
|