self assert: (file species isKindOf: FileStream) But that is a weird test. What is the point ? You have to test behaviour, like write a file and see if it was written. Testing types is very seldom done, because this is an implementation detail.
On 04 Dec 2014, at 01:32, sheridan@sheridan-mahoney.com wrote:
Hi there,
I have a failing test and was wondering if anyone would have a sense as to why:
| testString filename file | testString := 'ascii String'. filename := 'test-file-' , 99 atRandom printString , '.txt'. filename asFileReference ensureDelete. file := filename asFileReference writeStreamDo: [ :stream | stream nextPutAll: testString; crlf ]. self assert: file species = FileStream.
Many thanks,
Sheri