aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider/ruby_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/provider/ruby_spec.lua')
-rw-r--r--test/functional/provider/ruby_spec.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/functional/provider/ruby_spec.lua b/test/functional/provider/ruby_spec.lua
index d3b967dfbe..9b2531a23c 100644
--- a/test/functional/provider/ruby_spec.lua
+++ b/test/functional/provider/ruby_spec.lua
@@ -8,9 +8,9 @@ local exc_exec = helpers.exc_exec
local expect = helpers.expect
local feed = helpers.feed
local feed_command = helpers.feed_command
-local funcs = helpers.funcs
+local fn = helpers.fn
local insert = helpers.insert
-local meths = helpers.meths
+local api = helpers.api
local missing_provider = helpers.missing_provider
local matches = helpers.matches
local write_file = helpers.write_file
@@ -36,19 +36,19 @@ end)
describe('ruby feature test', function()
it('works', function()
- eq(1, funcs.has('ruby'))
+ eq(1, fn.has('ruby'))
end)
end)
describe(':ruby command', function()
it('evaluates ruby', function()
command('ruby VIM.command("let g:set_by_ruby = [100, 0]")')
- eq({100, 0}, meths.get_var('set_by_ruby'))
+ eq({ 100, 0 }, api.nvim_get_var('set_by_ruby'))
end)
it('supports nesting', function()
command([[ruby VIM.command('ruby VIM.command("let set_by_nested_ruby = 555")')]])
- eq(555, meths.get_var('set_by_nested_ruby'))
+ eq(555, api.nvim_get_var('set_by_nested_ruby'))
end)
end)
@@ -57,7 +57,7 @@ describe(':rubyfile command', function()
local fname = 'rubyfile.rb'
write_file(fname, 'VIM.command("let set_by_rubyfile = 123")')
command('rubyfile rubyfile.rb')
- eq(123, meths.get_var('set_by_rubyfile'))
+ eq(123, api.nvim_get_var('set_by_rubyfile'))
os.remove(fname)
end)
end)
@@ -97,7 +97,7 @@ describe(':rubydo command', function()
it('does not modify the buffer if no changes are made', function()
command('normal :rubydo 42')
- eq(false, meths.get_option_value('modified', {}))
+ eq(false, api.nvim_get_option_value('modified', {}))
end)
end)
@@ -112,11 +112,11 @@ end)
describe('rubyeval()', function()
it('evaluates ruby objects', function()
- eq({1, 2, {['key'] = 'val'}}, funcs.rubyeval('[1, 2, {key: "val"}]'))
+ eq({ 1, 2, { ['key'] = 'val' } }, fn.rubyeval('[1, 2, {key: "val"}]'))
end)
it('returns nil for empty strings', function()
- eq(helpers.NIL, funcs.rubyeval(''))
+ eq(vim.NIL, fn.rubyeval(''))
end)
it('errors out when given non-string', function()