@@ -61,7 +61,7 @@ def expect_request(body: nil, endpoint: nil)
6161 opts = { args : [ '-f' ] }
6262 expect_request ( body : { capabilities : { alwaysMatch : { browserName : 'chrome' , 'goog:chromeOptions' : opts } } } )
6363
64- expect { Driver . new ( options : Chrome :: Options . new ( **opts ) ) } . not_to raise_exception
64+ expect { Driver . new ( options : Options . chrome ( **opts ) ) } . not_to raise_exception
6565 end
6666
6767 context 'with :capabilities' do
@@ -108,7 +108,7 @@ def as_json(*)
108108 end
109109
110110 it 'with Options instance' do
111- options = Chrome :: Options . new ( args : [ '-f' ] )
111+ options = Options . chrome ( args : [ '-f' ] )
112112 expect_request ( body : { capabilities : { alwaysMatch : { browserName : "chrome" ,
113113 'goog:chromeOptions' : { args : [ '-f' ] } } } } )
114114
@@ -126,12 +126,12 @@ def as_json(*)
126126 expect_request ( body : { capabilities : { alwaysMatch : { browserName : "chrome" ,
127127 'goog:chromeOptions' : { } ,
128128 'company:key' : 'value' } } } )
129- expect { Driver . new ( capabilities : [ Chrome :: Options . new , as_json_object . new ] ) } . not_to raise_exception
129+ expect { Driver . new ( capabilities : [ Options . chrome , as_json_object . new ] ) } . not_to raise_exception
130130 end
131131
132132 it 'with Options instance, Capabilities instance and instance of a custom object responding to #as_json' do
133133 capabilities = Remote ::Capabilities . new ( browser_name : 'chrome' , invalid : 'foobar' )
134- options = Chrome :: Options . new ( args : [ '-f' ] )
134+ options = Options . chrome ( args : [ '-f' ] )
135135 expect_request ( body : { capabilities : { alwaysMatch : { browserName : "chrome" , invalid : 'foobar' ,
136136 'goog:chromeOptions' : { args : [ '-f' ] } ,
137137 'company:key' : 'value' } } } )
0 commit comments