Skip to content

Commit 882a16f

Browse files
committed
move defoverridable to test for elixirAtom
1 parent 36bd70a commit 882a16f

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

spec/syntax/atom_spec.rb

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,31 @@
4747
expect(s).to include_elixir_syntax('elixirAtom', 'do')
4848
expect(s).to include_elixir_syntax('elixirAtom', 'into')
4949
end
50+
51+
it 'defoverridable' do
52+
expect(<<~EOF).to include_elixir_syntax('elixirAtom', 'init:')
53+
defmodule Test do
54+
defmacro __using__(_options) do
55+
quote do
56+
def init(args) do
57+
{:ok, args}
58+
end
59+
defoverridable init: 1
60+
end
61+
end
62+
end
63+
EOF
64+
expect(<<~EOF).to include_elixir_syntax('elixirAtom', 'init:')
65+
defmodule Test do
66+
defmacro __using__(_options) do
67+
quote do
68+
def init(args) do
69+
{:ok, args}
70+
end
71+
defoverridable [init: 1]
72+
end
73+
end
74+
end
75+
EOF
76+
end
5077
end

spec/syntax/keyword_spec.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,4 @@
1414
case true do
1515
EOF
1616
end
17-
18-
it 'defoverridable' do
19-
expect(<<~EOF).to include_elixir_syntax('elixirKeyword', 'init:')
20-
defmodule Test do
21-
defmacro __using__(_options) do
22-
quote do
23-
def init(args) do
24-
{:ok, args}
25-
end
26-
defoverridable init: 1
27-
end
28-
end
29-
end
30-
EOF
31-
end
3217
end

0 commit comments

Comments
 (0)