sunshinejr / SwiftyUserDefaults

Modern Swift API for NSUserDefaults
http://radex.io/swift/nsuserdefaults/static
MIT License
4.84k stars 364 forks source link

Fix tests by storing the observation token. #263

Closed laevandus closed 3 years ago

laevandus commented 3 years ago

I noticed that unit-tests were failing and therefore went ahead and fixed them. Observation token was immediately released and therefore observer block was never triggered and caused the update variable to be always nil.