1
0
Fork 0
mirror of synced 2024-11-15 13:38:58 -05:00
ultimate-vim/sources_non_forked/vim-elixir/spec/syntax/function_spec.rb

21 lines
601 B
Ruby
Raw Normal View History

2022-05-18 13:31:41 -04:00
# frozen_string_literal: true
require 'spec_helper'
describe 'function syntax' do
it 'doesnt treat underscored functions like unsued variables' do
expect(<<~EOF).to include_elixir_syntax('elixirId', '__ensure_defimpl__')
defp derive(protocol, for, struct, opts, env) do
# ... code ...
__ensure_defimpl__(protocol, for, env)
EOF
expect(<<~EOF).not_to include_elixir_syntax('elixirUnusedVariable', '__ensure_defimpl__')
defp derive(protocol, for, struct, opts, env) do
# ... code ...
__ensure_defimpl__(protocol, for, env)
EOF
end
end