canola.nvim/spec/config_spec.lua
Barrett Ruth 14bb77d842 refactor: remove vim.g.oil declarative config
Problem: the `vim.g.oil` configuration path was added prematurely.
It adds a second config entrypoint before the plugin has stabilized
enough to justify it.

Solution: remove `vim.g.oil` support from `plugin/oil.lua`,
`config.setup()`, docs, and tests. Users configure via
`require("oil").setup({})`.
2026-03-10 22:48:44 -04:00

15 lines
472 B
Lua

local config = require('oil.config')
describe('config', function()
it('uses defaults when setup() is called with no args', function()
config.setup()
assert.is_false(config.delete_to_trash)
assert.equals(2000, config.cleanup_delay_ms)
end)
it('applies explicit opts', function()
config.setup({ delete_to_trash = true, cleanup_delay_ms = 5000 })
assert.is_true(config.delete_to_trash)
assert.equals(5000, config.cleanup_delay_ms)
end)
end)