1
0
Fork 0
mirror of synced 2024-12-27 00:53:20 -05:00
ultimate-vim/sources_non_forked/vim-elixir/spec/syntax/function_spec.rb
2022-05-19 01:31:41 +08:00

20 lines
601 B
Ruby

# 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