pharo-project / pharo

Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
http://pharo.org
Other
1.21k stars 356 forks source link

TestCase >> failureLog should not refer to a globla #17403

Open Ducasse opened 4 days ago

Ducasse commented 4 days ago
TestCase >> failureLog
    ^ Smalltalk tools transcript

Should be turned into

TestCase >> failureLog
    ^ application tools transcript

http://rmod-pharo-mooc.lille.inria.fr/AdvancedDesignMooc/Slides/M9-4-CaseStudy-06-LayeredSettingsArchitecture.pdf

Practice what you preach!

https://www.youtube.com/watch?v=FQfgET6TxDY

hernanmd commented 2 days ago

StPharoApplication is in 'NewTools-Core'. So implementing application would introduce a new dependency from SUnit to NewTools.

Do you know how can I get the application without introducing this dependency?

Ducasse commented 3 hours ago

Indeed this is a problem. My impression is that my suggestion was wrong. In fact the failureLog should refer to a stream and provide a setter so that clients may decide to inject a different streamable object. Like that we can if we want ask the log to be redirected to transcript and this is the responsibility of the tools in the upper layer to provide correct objects.