Skip to content

Commit

Permalink
fixes tests for 0.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ityonemo committed Aug 4, 2024
1 parent 11945ef commit 7fa8717
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/zig.doc/generator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defmodule Zig.Doc.Generator do
# options must include 'file' key
with {:ok, file_path} <- Keyword.fetch(options, :file),
{{:ok, file}, :read, _} <- {File.read(file_path), :read, file_path} do
sema = sema_module.run_sema(file_path)
sema = sema_module.run_sema_doc(file_path)
parsed_document = Zig.Parser.parse(file)

node = %ExDoc.ModuleNode{
Expand Down
2 changes: 1 addition & 1 deletion test/_support/sema.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Zig.SemaAPI do
@type json :: nil | boolean | number | String.t() | [json] | %{optional(String.t()) => json}
@callback run_sema(Path.t()) :: {:ok, json} | {:error, String.t()}
@callback run_sema_doc(Path.t()) :: {:ok, json} | {:error, String.t()}
end

Mox.defmock(Zig.SemaMock, for: Zig.SemaAPI)
2 changes: 1 addition & 1 deletion test/_support/zig_doc_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule Zig.Doc.Case do
end

def expect_sema(sema) do
Mox.expect(Zig.SemaMock, :run_sema, fn _ -> sema end)
Mox.expect(Zig.SemaMock, :run_sema_doc, fn _ -> sema end)
end

defmacro assert_code(string, data) do
Expand Down

0 comments on commit 7fa8717

Please sign in to comment.