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
149
149
require Application
150
150
true = Application.compile_env!(:git_repo, :archive_config)
151
151
152
- defmodule GitRepo do
152
+ defmodule GitRepo.Archive do
153
153
def hello do
154
154
"World"
155
155
end
156
156
end
157
157
""" )
158
158
159
+ System . cmd ( "git" , ~w[ init] )
160
+ System . cmd ( "git" , ~w[ add .] )
161
+ System . cmd ( "git" , ~w[ commit -m first-commit] )
162
+
159
163
send ( self ( ) , { :mix_shell_input , :yes? , true } )
160
164
Mix.Tasks.Archive.Install . run ( [ "git" , File . cwd! ( ) ] )
165
+ assert GitRepo.Archive . hello ( ) == "World"
161
166
162
167
message = "Generated archive \" git_repo-0.1.0.ez\" with MIX_ENV=prod"
163
168
assert_received { :mix_shell , :info , [ ^ message ] }
@@ -166,7 +171,7 @@ defmodule Mix.Tasks.ArchiveTest do
166
171
assert File . dir? ( tmp_path ( "userhome/.mix/archives/git_repo-0.1.0/git_repo-0.1.0/ebin" ) )
167
172
end )
168
173
after
169
- purge ( [ GitRepo , GitRepo.MixProject ] )
174
+ purge ( [ GitRepo.Archive , GitRepo.MixProject ] )
170
175
end
171
176
172
177
test "archive install, update, and uninstall life-cycle" do
You can’t perform that action at this time.
0 commit comments