Skip to content

Commit

Permalink
make mod_base simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleVsteger committed Oct 31, 2024
1 parent 6e16044 commit 3fe90cc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/channel_spec/socket_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,10 @@ defmodule ChannelSpec.SocketTest do
`Map.update` with a default and generates a valid schema.
"""

mod_base = __MODULE__

defmodule Base do
@mod_base Module.split(__MODULE__) |> Enum.drop(-1) |> Module.concat()
@mod_base mod_base

def schema() do
%{
Expand All @@ -625,7 +627,7 @@ defmodule ChannelSpec.SocketTest do
end

defmodule Flim do
@mod_base Module.split(__MODULE__) |> Enum.drop(-1) |> Module.concat()
@mod_base mod_base

def schema() do
%{
Expand All @@ -650,7 +652,7 @@ defmodule ChannelSpec.SocketTest do
end

defmodule Bar do
@mod_base Module.split(__MODULE__) |> Enum.drop(-1) |> Module.concat()
@mod_base mod_base

def schema() do
%{type: :object, properties: %{baz: %{"$ref": :"#{@mod_base}.Baz"}}}
Expand Down

0 comments on commit 3fe90cc

Please sign in to comment.