From 45a8f42335179f7a0714e273691bd5589e981fa5 Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Fri, 30 Aug 2019 14:25:57 +0200 Subject: [PATCH] improve cucumber implementation --- src/test/kotlin/RunCucumberTest.kt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/test/kotlin/RunCucumberTest.kt b/src/test/kotlin/RunCucumberTest.kt index 81110bd..270bfe6 100644 --- a/src/test/kotlin/RunCucumberTest.kt +++ b/src/test/kotlin/RunCucumberTest.kt @@ -32,18 +32,16 @@ class RunCucumberTest: En, KoinTest { } init { - Before(-2) { _: Scenario -> - if (!unitialized) { - config.database = "test" - config.username = "test" - config.password = "test" + if (!unitialized) { + config.database = "test" + config.username = "test" + config.password = "test" - withTestApplication({ module(CUCUMBER) }) { - migrations() - fixtures() - } - unitialized = true + withTestApplication({ module(CUCUMBER) }) { + migrations() + fixtures() } + unitialized = true } Before(-1) { scenario: Scenario ->