Skip to content

Commit e8ab3ff

Browse files
committed
test: fix lsp_spec
1 parent 36d0a99 commit e8ab3ff

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spec/lsp_spec.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ describe('LSP client API', function()
99
local notify_once = stub(vim, 'notify_once')
1010
local notify = stub(vim, 'notify')
1111
local deprecate = stub(vim, 'deprecate')
12-
-- load RustAnalyzer command
13-
require('rustaceanvim.lsp')
12+
local lsp = require('rustaceanvim.lsp')
1413
local RustaceanConfig = require('rustaceanvim.config.internal')
1514
local Types = require('rustaceanvim.types.internal')
1615
local ra_bin = Types.evaluate(RustaceanConfig.server.cmd)[1]
@@ -21,7 +20,7 @@ describe('LSP client API', function()
2120
vim.api.nvim_buf_set_name(bufnr, 'test.rs')
2221
vim.bo[bufnr].filetype = 'rust'
2322
vim.api.nvim_set_current_buf(bufnr)
24-
vim.cmd.RustAnalyzer('start')
23+
lsp.start()
2524
assert.stub(lsp_start).called(1)
2625
-- FIXME: This might not work in a sandboxed nix build
2726
-- local ra = require('rustaceanvim.rust_analyzer')

0 commit comments

Comments
 (0)