I have these two lines in a unit test.
If I comment out the STAssertTrue test, the data gets written to file with no issues and write to file is YES.
BOOL writeResult = [winePDF writeToFile:wineDocumentDirectoryFilename atomically:YES];
STAssertTrue((writeResult), @"Didn't write to file");
I would expect this test to pass, but it fails. I’ve tried
STAssertEquals(YES, writeResult, @"Didn't write to file");
which also failed.
Not done much in unit testing so slapping my forehead in anticipation of your well informed answer.
Your code looks correct to me. Are you sure the write is succeeding? Are you sure that winePDF is non-nill?
I would suggest adding this before your first line: