diff options
author | Jakob Odersky <jakob@odersky.com> | 2017-03-06 01:47:50 -0800 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2017-03-06 01:47:50 -0800 |
commit | bd7083167c1a0899f722971fb90ce41c96de252f (patch) | |
tree | e0bcad925419f1801caa2d2cd8270417c7a5b2e8 /crashbox-server/src/test/scala/io/crashbox | |
parent | 374ac0ce8c10e9063c263ecf9c708f9ee6772973 (diff) | |
download | crashbox-ci-bd7083167c1a0899f722971fb90ce41c96de252f.tar.gz crashbox-ci-bd7083167c1a0899f722971fb90ce41c96de252f.tar.bz2 crashbox-ci-bd7083167c1a0899f722971fb90ce41c96de252f.zip |
scalafmt
Diffstat (limited to 'crashbox-server/src/test/scala/io/crashbox')
-rw-r--r-- | crashbox-server/src/test/scala/io/crashbox/ci/SourceSpec.scala | 5 | ||||
-rw-r--r-- | crashbox-server/src/test/scala/io/crashbox/ci/TestUtil.scala | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/crashbox-server/src/test/scala/io/crashbox/ci/SourceSpec.scala b/crashbox-server/src/test/scala/io/crashbox/ci/SourceSpec.scala index 9bef01d..a03e476 100644 --- a/crashbox-server/src/test/scala/io/crashbox/ci/SourceSpec.scala +++ b/crashbox-server/src/test/scala/io/crashbox/ci/SourceSpec.scala @@ -23,10 +23,11 @@ class SourceSpec extends FlatSpec with Matchers with Source with Core { } "GitFetchers" should "be able to clone a local repository" in { - TestUtil.withTempDir{ remote => + TestUtil.withTempDir { remote => makeRepo(remote) TestUtil.withTempDir { local => - val cloned = Await.result(fetchSource(remote.toURI().toURL(), local), Timeout) + val cloned = + Await.result(fetchSource(remote.toURI().toURL(), local), Timeout) assert(cloned.listFiles().length == 3) } } diff --git a/crashbox-server/src/test/scala/io/crashbox/ci/TestUtil.scala b/crashbox-server/src/test/scala/io/crashbox/ci/TestUtil.scala index eb177f8..a7e7ae6 100644 --- a/crashbox-server/src/test/scala/io/crashbox/ci/TestUtil.scala +++ b/crashbox-server/src/test/scala/io/crashbox/ci/TestUtil.scala @@ -1,13 +1,14 @@ package io.crashbox.ci -import java.io.{ File, OutputStream } +import java.io.{File, OutputStream} import java.nio.file.Files object TestUtil { def withTempDir[A](f: File => A): A = { val dir = Files.createTempDirectory("crashbox-test").toFile - try f(dir) finally dir.delete() + try f(dir) + finally dir.delete() } } |