Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use FileSystem workingDirectory in tests #28

Open
dionisiydk opened this issue Jan 25, 2018 · 0 comments
Open

Do not use FileSystem workingDirectory in tests #28

dionisiydk opened this issue Jan 25, 2018 · 0 comments

Comments

@dionisiydk
Copy link

dionisiydk commented Jan 25, 2018

Now if you will run pharo on MacOS using Finder (by drag and drop image for example) tests which generate temp files will fail. The problem is that working directory is resolved by OS as the root in that case.
In Pharo 6 workingDirectory was equal to imageDirectory and tests were always green.
But in Pharo 7 it is the true OS based working directory

I suggest to use in tests FileLocator temp instead of workingDirectory. Or even better, use existing method to get temp files.
For example replace following code:

FileSystem workingDirectory / 'zombiesByPharoVM-' , UUID new printString

with:

FileReference newTempFilePrefix: 'zombiesByPharoVM-' suffix: ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant