On Monday, 21 May 2018 at 15:16:11 UTC, Atila Neves wrote:
On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote:
Hi,
What's the current official position on how to create
temporary files for use during a unittest. I found
Not official, but...
import unit_threaded;
with(const Sandbox()) {
writeFile("myfile.txt", "contents");
shouldExist("myfile.txt");
shouldEqualContent("myfile.txt", "contents");
fileShouldContain("myfile.txt", "cont");
}
Atila
I've never seen "should" being in used in function names before...