2017-09-15 9 views
0

このサンプルコードを実行すると、 "on"アクションのすべてのコードがAndroid Studioで実行されません。なぜなのかご存知ですか?何が欠けている?このSpek on actionはなぜ動作しませんか?

import org.jetbrains.spek.api.Spek 
import org.jetbrains.spek.api.dsl.describe 
import org.jetbrains.spek.api.dsl.given 
import org.jetbrains.spek.api.dsl.it 
import org.jetbrains.spek.api.dsl.on 

@RunWith(JUnitPlatform::class) class SpekTest : Spek({ 
    val x = 2 
    val y = 3 

    given("x = $x and y = $y") { 
     val sum = x + y 

     on ("why does this not run?") { 
      it("should be that x + y = 5") { 
       assertEquals(5, sum) 
      } 

      it("should be that x - y = -1") { 
       val subtract = x - y 
       assertEquals(-111, subtract) 
      } 
     } 

    } }) 

答えて

0

testCompile group: 'org.jetbrains.spek', name: 'spek-api', version: '1.1.4' 
testCompile group: 'org.jetbrains.spek', name: 'spek-junit-platform-engine', version: '1.1.4' 
する仕様のバージョンを更新することを確認します
関連する問題