marshall.schor (2) [Avatar] Offline
#1
The two assert.pretender.count values are one too low. It should read

...
assert pretender.isNoField == 'pretend value' // will increment count
assert pretender.count == 1 // not 0, as my copy of the book says

pretender.isNoFieldEither = 'just to increase counter' // counter goes from 1 to 2
assert pretender.count == 2 // not 1, as my copy of the book says
Mittie (397) [Avatar] Offline
#2
Re: errata in Listing 7.4
Hi,

sorry, I cannot reproduce the behavior you describe. The assertions all run fine for me. Can you please post the full script that you are executing?

thanks for the post
Dierk
marshall.schor (2) [Avatar] Offline
#3
Re: errata in Listing 7.4
oops - you are correct.

I mis-read the first statement:

assert pretender.isNoField == 'pretend value' // will increment count

as a "setter" - seeing the == as just an =.

Sorry. Marshall