File tree Expand file tree Collapse file tree 10 files changed +85
-65
lines changed
integration/selenium/webdriver Expand file tree Collapse file tree 10 files changed +85
-65
lines changed Original file line number Diff line number Diff line change @@ -37,19 +37,6 @@ module Chrome
3737 it 'can be started outside driver' do
3838 expect ( service_manager . uri ) . to be_a ( URI )
3939 end
40-
41- it 'uses the path from the environment' do
42- ENV [ 'SE_CHROMEDRIVER' ] = DriverFinder . new ( Options . new , described_class . new ) . driver_path
43-
44- expect ( service_manager . uri ) . to be_a ( URI )
45- end
46-
47- it 'updates the path after setting the environment variable' do
48- ENV [ 'SE_CHROMEDRIVER' ] = '/foo/bar'
49- service . executable_path = DriverFinder . new ( Options . new , described_class . new ) . driver_path
50-
51- expect ( service_manager . uri ) . to be_a ( URI )
52- end
5340 end
5441 end # Chrome
5542 end # WebDriver
Original file line number Diff line number Diff line change @@ -37,19 +37,6 @@ module Edge
3737 it 'can be started outside driver' do
3838 expect ( service_manager . uri ) . to be_a ( URI )
3939 end
40-
41- it 'uses the path from the environment' do
42- ENV [ 'SE_EDGEDRIVER' ] = DriverFinder . new ( Options . new , described_class . new ) . driver_path
43-
44- expect ( service_manager . uri ) . to be_a ( URI )
45- end
46-
47- it 'updates the path after setting the environment variable' do
48- ENV [ 'SE_EDGEDRIVER' ] = '/foo/bar'
49- service . executable_path = DriverFinder . new ( Options . new , described_class . new ) . driver_path
50-
51- expect ( service_manager . uri ) . to be_a ( URI )
52- end
5340 end
5441 end # Edge
5542 end # WebDriver
Original file line number Diff line number Diff line change @@ -37,19 +37,6 @@ module Firefox
3737 it 'can be started outside driver' do
3838 expect ( service_manager . uri ) . to be_a ( URI )
3939 end
40-
41- it 'uses the path from the environment' do
42- ENV [ 'SE_GECKODRIVER' ] = DriverFinder . new ( Options . new , described_class . new ) . driver_path
43-
44- expect ( service_manager . uri ) . to be_a ( URI )
45- end
46-
47- it 'updates the path after setting the environment variable' do
48- ENV [ 'SE_GECKODRIVER' ] = '/foo/bar'
49- service . executable_path = DriverFinder . new ( Options . new , described_class . new ) . driver_path
50-
51- expect ( service_manager . uri ) . to be_a ( URI )
52- end
5340 end
5441 end # Firefox
5542 end # WebDriver
Original file line number Diff line number Diff line change @@ -37,19 +37,6 @@ module IE
3737 it 'can be started outside driver' do
3838 expect ( service_manager . uri ) . to be_a ( URI )
3939 end
40-
41- it 'uses the path from the environment' do
42- ENV [ 'SE_IEIDRIVER' ] = DriverFinder . new ( Options . new , described_class . new ) . driver_path
43-
44- expect ( service_manager . uri ) . to be_a ( URI )
45- end
46-
47- it 'updates the path after setting the environment variable' do
48- ENV [ 'SE_IEIDRIVER' ] = '/foo/bar'
49- service . executable_path = DriverFinder . new ( Options . new , described_class . new ) . driver_path
50-
51- expect ( service_manager . uri ) . to be_a ( URI )
52- end
5340 end
5441 end # IE
5542 end # WebDriver
Original file line number Diff line number Diff line change @@ -37,19 +37,6 @@ module Safari
3737 it 'can be started outside driver' do
3838 expect ( service_manager . uri ) . to be_a ( URI )
3939 end
40-
41- it 'uses the path from the environment' do
42- ENV [ 'SE_SAFARIDRIVER' ] = DriverFinder . new ( Options . new , described_class . new ) . driver_path
43-
44- expect ( service_manager . uri ) . to be_a ( URI )
45- end
46-
47- it 'updates the path after setting the environment variable' do
48- ENV [ 'SE_SAFARIDRIVER' ] = '/foo/bar'
49- service . executable_path = DriverFinder . new ( Options . new , described_class . new ) . driver_path
50-
51- expect ( service_manager . uri ) . to be_a ( URI )
52- end
5340 end
5441 end # Safari
5542 end # WebDriver
Original file line number Diff line number Diff line change @@ -119,6 +119,23 @@ module Chrome
119119 driver . new ( service : service )
120120 expect ( described_class ) . not_to have_received ( :new )
121121 end
122+
123+ context 'with a path env variable' do
124+ before { ENV [ 'SE_CHROMEDRIVER' ] = DriverFinder . new ( Options . new , described_class . new ) . driver_path }
125+
126+ after { ENV . delete ( 'SE_CHROMEDRIVER' ) }
127+
128+ it 'uses the path from the environment' do
129+ expect ( service_manager . uri ) . to be_a ( URI )
130+ end
131+
132+ it 'updates the path after setting the environment variable' do
133+ ENV [ 'SE_CHROMEDRIVER' ] = '/foo/bar'
134+ service . executable_path = DriverFinder . new ( Options . new , described_class . new ) . driver_path
135+
136+ expect ( service_manager . uri ) . to be_a ( URI )
137+ end
138+ end
122139 end
123140 end
124141 end # Chrome
Original file line number Diff line number Diff line change @@ -129,6 +129,23 @@ module Edge
129129 expect ( service . log ) . to be_nil
130130 expect ( service . args ) . to eq [ '--log-path=/path/to/log.txt' ]
131131 end
132+
133+ context 'with a path env variable' do
134+ before { ENV [ 'SE_EDGEDRIVER' ] = DriverFinder . new ( Options . new , described_class . new ) . driver_path }
135+
136+ after { ENV . delete ( 'SE_EDGEDRIVER' ) }
137+
138+ it 'uses the path from the environment' do
139+ expect ( service_manager . uri ) . to be_a ( URI )
140+ end
141+
142+ it 'updates the path after setting the environment variable' do
143+ ENV [ 'SE_EDGEDRIVER' ] = '/foo/bar'
144+ service . executable_path = DriverFinder . new ( Options . new , described_class . new ) . driver_path
145+
146+ expect ( service_manager . uri ) . to be_a ( URI )
147+ end
148+ end
132149 end
133150 end
134151 end # Edge
Original file line number Diff line number Diff line change @@ -117,6 +117,23 @@ module Firefox
117117
118118 expect ( described_class ) . not_to have_received ( :new )
119119 end
120+
121+ context 'with a path env variable' do
122+ before { ENV [ 'SE_GECKODRIVER' ] = DriverFinder . new ( Options . new , described_class . new ) . driver_path }
123+
124+ after { ENV . delete ( 'SE_GECKODRIVER' ) }
125+
126+ it 'uses the path from the environment' do
127+ expect ( service_manager . uri ) . to be_a ( URI )
128+ end
129+
130+ it 'updates the path after setting the environment variable' do
131+ ENV [ 'SE_GECKODRIVER' ] = '/foo/bar'
132+ service . executable_path = DriverFinder . new ( Options . new , described_class . new ) . driver_path
133+
134+ expect ( service_manager . uri ) . to be_a ( URI )
135+ end
136+ end
120137 end
121138 end
122139 end # Firefox
Original file line number Diff line number Diff line change @@ -119,6 +119,23 @@ module IE
119119
120120 expect ( described_class ) . not_to have_received ( :new )
121121 end
122+
123+ context 'with a path env variable' do
124+ before { ENV [ 'SE_IEIDRIVER' ] = DriverFinder . new ( Options . new , described_class . new ) . driver_path }
125+
126+ after { ENV . delete ( 'SE_IEIDRIVER' ) }
127+
128+ it 'uses the path from the environment' do
129+ expect ( service_manager . uri ) . to be_a ( URI )
130+ end
131+
132+ it 'updates the path after setting the environment variable' do
133+ ENV [ 'SE_IEIDRIVER' ] = '/foo/bar'
134+ service . executable_path = DriverFinder . new ( Options . new , described_class . new ) . driver_path
135+
136+ expect ( service_manager . uri ) . to be_a ( URI )
137+ end
138+ end
122139 end
123140 end
124141 end # IE
Original file line number Diff line number Diff line change @@ -114,6 +114,23 @@ module Safari
114114
115115 expect ( described_class ) . not_to have_received ( :new )
116116 end
117+
118+ context 'with a path env variable' do
119+ before { ENV [ 'SE_SAFARIDRIVER' ] = DriverFinder . new ( Options . new , described_class . new ) . driver_path }
120+
121+ after { ENV . delete ( 'SE_SAFARIDRIVER' ) }
122+
123+ it 'uses the path from the environment' do
124+ expect ( service_manager . uri ) . to be_a ( URI )
125+ end
126+
127+ it 'updates the path after setting the environment variable' do
128+ ENV [ 'SE_SAFARIDRIVER' ] = '/foo/bar'
129+ service . executable_path = DriverFinder . new ( Options . new , described_class . new ) . driver_path
130+
131+ expect ( service_manager . uri ) . to be_a ( URI )
132+ end
133+ end
117134 end
118135 end
119136 end # Safari
You can’t perform that action at this time.
0 commit comments