首先,我看到它和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