@@ -85,7 +85,8 @@ module WebDriver
8585
8686 described_class . driver_path ( Options . chrome )
8787
88- expect ( described_class ) . to have_received ( :run ) . with ( "selenium-manager --browser 'chrome' --output json" )
88+ expect ( described_class ) . to have_received ( :run )
89+ . with ( 'selenium-manager' , '--browser' , 'chrome' , '--output' , 'json' )
8990 end
9091
9192 it 'uses browser version if specified' do
@@ -97,7 +98,7 @@ module WebDriver
9798 described_class . driver_path ( options )
9899
99100 expect ( described_class ) . to have_received ( :run )
100- . with ( " selenium-manager --browser 'chrome' --output json --browser-version 1" )
101+ . with ( ' selenium-manager' , ' --browser' , 'chrome' , ' --output' , ' json' , ' --browser-version' , 1 )
101102 end
102103
103104 it 'uses browser location if specified' do
@@ -109,7 +110,7 @@ module WebDriver
109110 described_class . driver_path ( options )
110111
111112 expect ( described_class ) . to have_received ( :run )
112- . with ( " selenium-manager --browser 'chrome' --output json --browser-path \" /path/to/browser\" " )
113+ . with ( ' selenium-manager' , ' --browser' , 'chrome' , ' --output' , ' json' , ' --browser-path' , ' /path/to/browser' )
113114 end
114115
115116 it 'properly escapes plain spaces in browser location' do
@@ -121,19 +122,8 @@ module WebDriver
121122 described_class . driver_path ( options )
122123
123124 expect ( described_class ) . to have_received ( :run )
124- . with ( "selenium-manager --browser 'chrome' --output json --browser-path \" /path\\ to/the/browser\" " )
125- end
126-
127- it 'properly escapes escaped spaces in browser location' do
128- allow ( described_class ) . to receive ( :run )
129- allow ( described_class ) . to receive ( :binary ) . and_return ( 'selenium-manager' )
130- allow ( Platform ) . to receive ( :assert_executable )
131- options = Options . chrome ( binary : '/path\ to/the/browser' )
132-
133- described_class . driver_path ( options )
134-
135- expect ( described_class ) . to have_received ( :run )
136- . with ( "selenium-manager --browser 'chrome' --output json --browser-path \" /path\\ to/the/browser\" " )
125+ . with ( 'selenium-manager' , '--browser' , 'chrome' , '--output' , 'json' ,
126+ '--browser-path' , '/path to/the/browser' )
137127 end
138128 end
139129 end
0 commit comments