Nicolas Cellier uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-nice.298.mcz
==================== Summary ====================
Name: Tests-nice.298 Author: nice Time: 27 May 2014, 12:30:53.426 am UUID: 9a8de954-af83-44b6-8b85-25057d5bff13 Ancestors: Tests-nice.297
Fix MCEnvironmentLoadTest
1) its environment failed to import itself, thus #bindingOf: failed to find #MCMockClassA, making testLoadIntoEnvironment fail (fixed in setUp) 2) its environment failed to import binding of #MCMockAPoolDictionary, and this was triggering a UI action - not good for automated tests (fixed in setUp) 3) the imported classes where not deleted, making further MCPackageTest testUnload fail (fixed in tearDown)
=============== Diff against Tests-nice.297 ===============
Item was changed: + ----- Method: MCEnvironmentLoadTest>>setUp (in category 'running') ----- - ----- Method: MCEnvironmentLoadTest>>setUp (in category 'as yet unclassified') ----- setUp + environment := Environment named: 'MCEnvironmentLoadTest'. + + "This is required in order to not importSelf more than once" + environment stopObserving: environment. + + "This is required to make own declarations visible in environment" + environment importSelf. + + "Import the required PoolDictionary used by the package" + environment bindingOf: #MCMockAPoolDictionary + ifAbsent: [environment from: Smalltalk globals import: #MCMockAPoolDictionary] + + "Curiously, the superclass MCMock will be used, but does not have to be imported, don't ask why..."! - environment := Environment named: 'MCEnvironmentLoadTest'.!
Item was added: + ----- Method: MCEnvironmentLoadTest>>tearDown (in category 'running') ----- + tearDown + (environment allClassesAndTraits sorted: [:a :b | + (a allSuperclasses includes: b) or: [a name < b name]]) + do: [:each | each removeFromSystem]!
Item was changed: + ----- Method: MCEnvironmentLoadTest>>testLoadIntoEnvironment (in category 'testing') ----- - ----- Method: MCEnvironmentLoadTest>>testLoadIntoEnvironment (in category 'as yet unclassified') ----- testLoadIntoEnvironment [MCPackageLoader installSnapshot: self mockSnapshot] on: CurrentEnvironment do: [:e | e resume: environment]. self assert: (environment bindingOf: #MCMockClassA) notNil description: 'Environment has no binding for MCMockClassA'.!
packages@lists.squeakfoundation.org