mirror of https://github.com/jruby-gradle/jem
Properly delete directories while on test teardown
This commit is contained in:
parent
963ed7c59e
commit
53d6dfed39
|
@ -36,9 +36,10 @@ dependencies {
|
|||
compile "org.jboss.shrinkwrap:shrinkwrap-bom:1.2.2"
|
||||
compile "org.jboss.shrinkwrap:shrinkwrap-depchain:1.2.2"
|
||||
|
||||
/* Used for FileUtils and deleting integration test dirs */
|
||||
testCompile 'org.apache.commons:commons-io:1.3.2'
|
||||
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
|
||||
testCompile 'org.apache.commons:commons-io:1.3.2+'
|
||||
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
@ -15,7 +15,6 @@ import com.github.jrubygradle.jem.Gem;
|
|||
import com.github.jrubygradle.jem.GemInstaller.DuplicateBehavior;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
|
|
|
@ -6,6 +6,8 @@ import spock.lang.*
|
|||
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import org.apache.commons.io.FileUtils
|
||||
|
||||
|
||||
class GemInstallerSpec extends Specification {
|
||||
static final String FIXTURES_ROOT = new File(['src', 'test', 'resources'].join(File.separator)).absolutePath
|
||||
|
@ -112,8 +114,7 @@ class GemInstallerIntegrationSpec extends Specification {
|
|||
File dir = new File(installDir)
|
||||
|
||||
if (dir.exists() && dir.absolutePath.startsWith('/tmp')) {
|
||||
println dir
|
||||
//FileUtils.deleteDirectory(dir)
|
||||
FileUtils.deleteDirectory(dir)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue