From 4e853a9d5b9563dbe1909757bf4be4d8e7d2b36a Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sat, 14 Sep 2019 16:45:39 +0800 Subject: . --- example/twirl/app/test/src/ExampleTests.scala | 4 ++-- example/twirl/build.sc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'example/twirl') diff --git a/example/twirl/app/test/src/ExampleTests.scala b/example/twirl/app/test/src/ExampleTests.scala index 815f656..2c445fb 100644 --- a/example/twirl/app/test/src/ExampleTests.scala +++ b/example/twirl/app/test/src/ExampleTests.scala @@ -4,7 +4,7 @@ import io.undertow.Undertow import utest._ object ExampleTests extends TestSuite{ - def test[T](example: cask.main.BaseMain)(f: String => T): T = { + def withServer[T](example: cask.main.BaseMain)(f: String => T): T = { val server = Undertow.builder .addHttpListener(8080, "localhost") .setHandler(example.defaultHandler) @@ -17,7 +17,7 @@ object ExampleTests extends TestSuite{ } val tests = Tests { - 'Twirl - test(Twirl) { host => + test("Twirl") - withServer(Twirl) { host => val body = requests.get(host).text() assert( diff --git a/example/twirl/build.sc b/example/twirl/build.sc index 6a59f0d..de9fc20 100644 --- a/example/twirl/build.sc +++ b/example/twirl/build.sc @@ -15,7 +15,7 @@ trait AppModule extends ScalaModule with mill.twirllib.TwirlModule{ def testFrameworks = Seq("utest.runner.Framework") def ivyDeps = Agg( - ivy"com.lihaoyi::utest::0.6.9", + ivy"com.lihaoyi::utest::0.7.1", ivy"com.lihaoyi::requests::0.2.0", ) } -- cgit v1.2.3