|
1 | 1 | /* eslint-disable no-process-env */ |
2 | 2 | import * as assert from "assert"; |
3 | 3 | import * as path from "path"; |
4 | | -import os from "os"; |
5 | 4 |
|
6 | 5 | import * as vscode from "vscode"; |
7 | 6 | import sinon from "sinon"; |
@@ -175,47 +174,6 @@ suite("Ruby environment activation", () => { |
175 | 174 | assert.deepStrictEqual(ruby.env, { BUNDLE_GEMFILE: ".ruby-lsp/Gemfile" }); |
176 | 175 | }); |
177 | 176 |
|
178 | | - test("Adds local exe directory to PATH when working on the Ruby LSP itself", async () => { |
179 | | - if (os.platform() === "win32") { |
180 | | - // We don't mutate the path on Windows |
181 | | - return; |
182 | | - } |
183 | | - |
184 | | - const manager = process.env.CI |
185 | | - ? ManagerIdentifier.None |
186 | | - : ManagerIdentifier.Chruby; |
187 | | - |
188 | | - const configStub = sinon |
189 | | - .stub(vscode.workspace, "getConfiguration") |
190 | | - .returns({ |
191 | | - get: (name: string) => { |
192 | | - if (name === "rubyVersionManager") { |
193 | | - return { identifier: manager }; |
194 | | - } else if (name === "bundleGemfile") { |
195 | | - return ""; |
196 | | - } |
197 | | - |
198 | | - return undefined; |
199 | | - }, |
200 | | - } as unknown as vscode.WorkspaceConfiguration); |
201 | | - |
202 | | - const workspacePath = path.dirname( |
203 | | - path.dirname(path.dirname(path.dirname(__dirname))), |
204 | | - ); |
205 | | - const lspFolder: vscode.WorkspaceFolder = { |
206 | | - uri: vscode.Uri.file(workspacePath), |
207 | | - name: path.basename(workspacePath), |
208 | | - index: 0, |
209 | | - }; |
210 | | - const ruby = new Ruby(context, lspFolder, outputChannel, FAKE_TELEMETRY); |
211 | | - await ruby.activateRuby(); |
212 | | - |
213 | | - const firstEntry = ruby.env.PATH!.split(path.delimiter)[0]; |
214 | | - assert.match(firstEntry, /ruby-lsp\/exe$/); |
215 | | - |
216 | | - configStub.restore(); |
217 | | - }).timeout(10000); |
218 | | - |
219 | 177 | test("Ignores untrusted workspace for telemetry", async () => { |
220 | 178 | const telemetry = { ...FAKE_TELEMETRY, logError: sinon.stub() }; |
221 | 179 | const ruby = new Ruby(context, workspaceFolder, outputChannel, telemetry); |
|
0 commit comments