首先,我看到它和this other post聽起來完全一樣,除了一件事情,我不能使用fixture.TestDataFixture,因爲我不能擴展fixture.FreeSpecLike,並且我相信一定有一些 (看起來更像這樣的代碼)沒有夾具的ScalaTest測試名稱?
class MySpec extends FlatSpecLike with fixture.TestDataFixture {
"this technique" - {
"should work" in {
assert(testData.name == "this technique should work")
}
"should be easy" in { td =>
assert(testData.name == "this technique should be easy")
}
}
}
任何想法?我簡直不敢相信這樣的事情是不可能的:d