File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -149,15 +149,20 @@ defmodule Mix.Tasks.ArchiveTest do
149149 require Application
150150 true = Application.compile_env!(:git_repo, :archive_config)
151151
152- defmodule GitRepo do
152+ defmodule GitRepo.Archive do
153153 def hello do
154154 "World"
155155 end
156156 end
157157 """ )
158158
159+ System . cmd ( "git" , ~w[ init] )
160+ System . cmd ( "git" , ~w[ add .] )
161+ System . cmd ( "git" , ~w[ commit -m first-commit] )
162+
159163 send ( self ( ) , { :mix_shell_input , :yes? , true } )
160164 Mix.Tasks.Archive.Install . run ( [ "git" , File . cwd! ( ) ] )
165+ assert GitRepo.Archive . hello ( ) == "World"
161166
162167 message = "Generated archive \" git_repo-0.1.0.ez\" with MIX_ENV=prod"
163168 assert_received { :mix_shell , :info , [ ^ message ] }
@@ -166,7 +171,7 @@ defmodule Mix.Tasks.ArchiveTest do
166171 assert File . dir? ( tmp_path ( "userhome/.mix/archives/git_repo-0.1.0/git_repo-0.1.0/ebin" ) )
167172 end )
168173 after
169- purge ( [ GitRepo , GitRepo.MixProject ] )
174+ purge ( [ GitRepo.Archive , GitRepo.MixProject ] )
170175 end
171176
172177 test "archive install, update, and uninstall life-cycle" do
You can’t perform that action at this time.
0 commit comments