File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,41 @@ defmodule Mix.Tasks.HelpTest do
222222 end )
223223 end
224224
225+ defmodule ExampleProject do
226+ def project do
227+ [
228+ app: :sample ,
229+ version: "0.1.0"
230+ ]
231+ end
232+ end
233+
234+ test "help app:APP for current project" , context do
235+ in_tmp ( context . test , fn ->
236+ Mix.Project . push ( ExampleProject )
237+ File . mkdir_p! ( "lib" )
238+
239+ File . write! ( "lib/example.ex" , ~s'''
240+ defmodule Example do
241+ @moduledoc """
242+ This is an example module.
243+ """
244+ end
245+ ''' )
246+
247+ output =
248+ capture_io ( fn ->
249+ Mix.Tasks.Help . run ( [ "app:sample" ] )
250+ end )
251+
252+ assert output =~ """
253+ # Example
254+
255+ This is an example module.
256+ """
257+ end )
258+ end
259+
225260 test "help Elixir MODULE" , context do
226261 in_tmp ( context . test , fn ->
227262 output =
You can’t perform that action at this time.
0 commit comments