I want to write a Spek test in Kotlin. The test should read an HTML file from the src/test/resources folder. How to do it?
src/test/resources
class MySpec : Spek({
A slightly different solution:
class MySpec : Spek({ describe("blah blah") { given("blah blah") { var fileContent = "" beforeEachTest { html = this.javaClass.getResource("/html/file.html").readText() } it("should blah blah") { ... } } } })