diff options
Diffstat (limited to 'tests/mason-core/managers/cargo_spec.lua')
| -rw-r--r-- | tests/mason-core/managers/cargo_spec.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/mason-core/managers/cargo_spec.lua b/tests/mason-core/managers/cargo_spec.lua index b5b07cf1..bdf1bb09 100644 --- a/tests/mason-core/managers/cargo_spec.lua +++ b/tests/mason-core/managers/cargo_spec.lua @@ -18,6 +18,7 @@ describe("cargo manager", function() async_test(function() local handle = InstallHandleGenerator "dummy" local ctx = InstallContextGenerator(handle, { version = "42.13.37" }) + installer.prepare_installer(ctx) installer.exec_in_context(ctx, cargo.crate "my-crate") assert.spy(ctx.spawn.cargo).was_called(1) assert.spy(ctx.spawn.cargo).was_called_with { @@ -38,6 +39,7 @@ describe("cargo manager", function() async_test(function() local handle = InstallHandleGenerator "dummy" local ctx = InstallContextGenerator(handle) + installer.prepare_installer(ctx) installer.exec_in_context(ctx, cargo.crate("my-crate", { git = { url = "https://my-crate.git" } })) assert.spy(ctx.spawn.cargo).was_called(1) assert.spy(ctx.spawn.cargo).was_called_with { @@ -58,6 +60,7 @@ describe("cargo manager", function() async_test(function() local handle = InstallHandleGenerator "dummy" local ctx = InstallContextGenerator(handle) + installer.prepare_installer(ctx) installer.exec_in_context(ctx, cargo.crate("crate-name", { git = { url = "https://my-crate.git" } })) assert.spy(ctx.spawn.cargo).was_called(1) assert.spy(ctx.spawn.cargo).was_called_with { @@ -78,6 +81,7 @@ describe("cargo manager", function() async_test(function() local handle = InstallHandleGenerator "dummy" local ctx = InstallContextGenerator(handle, { version = "42.13.37" }) + installer.prepare_installer(ctx) installer.exec_in_context(ctx, cargo.crate("my-crate", { features = "lsp" })) assert.spy(ctx.spawn.cargo).was_called(1) assert.spy(ctx.spawn.cargo).was_called_with { @@ -100,6 +104,7 @@ describe("cargo manager", function() stub(github, "tag") github.tag.returns { tag = "v2.1.1", with_receipt = mockx.just_runs } local ctx = InstallContextGenerator(handle, { version = "42.13.37" }) + installer.prepare_installer(ctx) installer.exec_in_context( ctx, cargo.crate("my-crate", { @@ -128,6 +133,7 @@ describe("cargo manager", function() async_test(function() local handle = InstallHandleGenerator "dummy" local ctx = InstallContextGenerator(handle) + installer.prepare_installer(ctx) installer.exec_in_context(ctx, cargo.crate "main-package") assert.same({ type = "cargo", |
