Skip to content

Commit

Permalink
[rb] Add aggregate_failures if there is more than one 'expect()'. (#7245
Browse files Browse the repository at this point in the history
)

* Add metadata (: aggregate_failures) to tests that check multiple properties.
  • Loading branch information
RustyNail authored and twalpole committed May 30, 2019
1 parent f70bd37 commit e682a2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rb/spec/unit/selenium/webdriver/proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module WebDriver
expect { proxy.type = :system }.to raise_error(ArgumentError)
end

it 'should allow valid options for a manual proxy' do
it 'should allow valid options for a manual proxy', :aggregate_failures do
proxy = Proxy.new(proxy_settings)

expect(proxy.ftp).to eq(proxy_settings[:ftp])
Expand All @@ -67,7 +67,7 @@ module WebDriver
expect(proxy.socks_version).to eq(proxy_settings[:socks_version])
end

it 'should return a hash of the json properties to serialize' do
it 'should return a hash of the json properties to serialize', :aggregate_failures do
proxy_json = Proxy.new(proxy_settings).as_json

expect(proxy_json['proxyType']).to eq('MANUAL')
Expand All @@ -81,21 +81,21 @@ module WebDriver
expect(proxy_json['socksVersion']).to eq(proxy_settings[:socks_version])
end

it 'should configure a PAC proxy' do
it 'should configure a PAC proxy', :aggregate_failures do
proxy_json = Proxy.new(pac_proxy_settings).as_json

expect(proxy_json['proxyType']).to eq('PAC')
expect(proxy_json['proxyAutoconfigUrl']).to eq(pac_proxy_settings[:pac])
end

it 'should configure an auto-detected proxy' do
it 'should configure an auto-detected proxy', :aggregate_failures do
proxy_json = Proxy.new(auto_detect: true).as_json

expect(proxy_json['proxyType']).to eq('AUTODETECT')
expect(proxy_json['autodetect']).to be true
end

it 'should only add settings that are not nil' do
it 'should only add settings that are not nil', :aggregate_failures do
settings = {type: :manual, http: 'http proxy'}

proxy = Proxy.new(settings)
Expand Down

0 comments on commit e682a2a

Please sign in to comment.