Skip to content

Commit 0e9d6ea

Browse files
committed
fix tests
1 parent beaee37 commit 0e9d6ea

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/mix/tasks/docs.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,8 @@ defmodule Mix.Tasks.Docs do
662662
end
663663

664664
defp update_output_for_formatter(options, _formatter) do
665-
options
665+
output = options[:output] || "doc"
666+
Keyword.put(options, :output, output)
666667
end
667668

668669
defp get_docs_opts(config) do

test/mix/tasks/docs_test.exs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ defmodule Mix.Tasks.DocsTest do
261261
]}
262262
] = run_results
263263

264-
assert html_options[:output] == "#{tmp_dir}/hello/html"
265-
assert epub_options[:output] == "#{tmp_dir}/hello/epub"
264+
assert html_options[:output] == "#{tmp_dir}/hello"
265+
assert epub_options[:output] == "#{tmp_dir}/hello"
266266
assert markdown_options[:output] == "#{tmp_dir}/hello/markdown"
267267
end
268268

@@ -305,8 +305,8 @@ defmodule Mix.Tasks.DocsTest do
305305
]}
306306
] = run_results
307307

308-
assert html_options[:output] == "#{tmp_dir}/world/html"
309-
assert epub_options[:output] == "#{tmp_dir}/world/epub"
308+
assert html_options[:output] == "#{tmp_dir}/world"
309+
assert epub_options[:output] == "#{tmp_dir}/world"
310310
assert markdown_options[:output] == "#{tmp_dir}/world/markdown"
311311
end
312312

0 commit comments

Comments
 (0)