Require relative symlink#2359
Require relative symlink#2359dbussink merged 2 commits intorubinius:masterfrom LTe:require_relative_symlink
Conversation
|
So the issue here is that Rubyspec also needs to work on Windows. On Windows, there are no symlinks, so we can't commit a symlink for a fixture directly. We need to guard the specs with a platform guard and setup the symlink in a before step so it only is specced on platforms supporting symlinks. |
|
@dbussink now spec will be executed only on non-windows platforms. |
There was a problem hiding this comment.
The cleanest way is probably to do use fixtures for the files, but to use a before and after block for creating and removing the symlink. Now the spec contains a lot of setup code that makes it less clear.
|
Cool! |
|
@dbussink I used fixtures and before/after block. |
There was a problem hiding this comment.
The guard needs to be moved up, guarding the whole describe block so it is properly scoped. We also don't use context as a description, but "describe" everywhere.
When rubinius try to execute require_relative with symlinked path File#dirname will not recognize symlink and returns wrong path. But File#realdirpath will follow symlink and return proper path for require_relative.
When rubinius try to execute require_relative with symlinked path
File#dirname will not recognize symlink and returns wrong path. But
File#realdirpath will follow symlink and return proper path for
require_relative.
Fix #2336