title: How to use dependency injection in Spek tests
body: <p>I am implementing simple microservice using Kotlin, Spring and Spek. I want to test my repository but I wonder how can I inject repo into spek test case. Every example or tutorial base on creating new reference like this:</p>
  
  <pre><code>object SampleTest : Spek({
      describe("a calculator") {
          val calculator = SampleCalculator()
  
          it("should return the result of adding the first number to the second number") {
              val sum = calculator.sum(2, 4)
              assertEquals(6, sum)
          }
  
          it("should return the result of subtracting the second number from the first number") {
              val subtract = calculator.subtract(4, 2)
              assertEquals(2, subtract)
          }
      }
  })
  </code></pre>
  
  <p>To summup I dont want to do sth like this:</p>
  
  <pre><code>val calculator = SampleCalculator()
  </code></pre>
  
  <p>I want to achieve this</p>
  
  <pre><code>@Autowired
  val calculator: SampleCalculator
  </code></pre>
  
  <p>but I cant to that becasue I cant autowire service into local variable.. Any solutions ? I am new in kotlin and spek.</p>