我想在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") {
...
}
}
}
})
Run Code Online (Sandbox Code Playgroud) kotlin ×1