【发布时间】:2017-03-11 19:45:56
【问题描述】:
我想用 Kotlin 编写一个 Spek 测试。测试应该从src/test/resources 文件夹中读取一个HTML 文件。怎么做?
class MySpec : Spek({
describe("blah blah") {
given("blah blah") {
var fileContent : String = ""
beforeEachTest {
// How to read the file file.html in src/test/resources/html
fileContent = ...
}
it("should blah blah") {
...
}
}
}
})
【问题讨论】:
标签: kotlin