Use rails() instead of system()

This commit is contained in:
John Hawthorn 2019-11-14 12:31:47 -08:00
parent 60cf674af1
commit 75afb43a25
1 changed files with 2 additions and 5 deletions

View File

@ -20,10 +20,7 @@ module ApplicationTests
def precompile!(env = nil)
with_env env.to_h do
quietly do
precompile_task = "bin/rails assets:precompile --trace 2>&1"
output = Dir.chdir(app_path) { %x[ #{precompile_task} ] }
assert $?.success?, output
output
rails ["assets:precompile", "--trace"]
end
end
end
@ -37,7 +34,7 @@ module ApplicationTests
def clean_assets!
quietly do
assert Dir.chdir(app_path) { system("bin/rails assets:clobber") }
rails ["assets:clobber"]
end
end