From 12c98ed56f89e0181e0fd452ea7f6df52bcebc17 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 16 Nov 2015 05:04:13 -0800 Subject: [PATCH] Fix tests. --- src/main/kotlin/com/beust/kobalt/api/Kobalt.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/beust/kobalt/api/Kobalt.kt b/src/main/kotlin/com/beust/kobalt/api/Kobalt.kt index 08880a46..b09567fc 100644 --- a/src/main/kotlin/com/beust/kobalt/api/Kobalt.kt +++ b/src/main/kotlin/com/beust/kobalt/api/Kobalt.kt @@ -1,13 +1,19 @@ package com.beust.kobalt.api +import com.beust.kobalt.Args import com.beust.kobalt.Plugins +import com.beust.kobalt.misc.MainModule +import com.google.inject.Guice import com.google.inject.Injector import java.io.InputStream import java.util.* public class Kobalt { companion object { - lateinit var INJECTOR : Injector + // This injector will eventually be replaced with a different injector initialized with the + // correct arguments (or with a TestModule) but it's necessary to give it a default value + // here so the kobalt-plugin.xml file can be read since this is done very early + var INJECTOR : Injector = Guice.createInjector(MainModule(Args())) var context: KobaltContext? = null