rubyspec/rubyspec — pull request #131 by eregon (2012-04-07 18:55:47+00:00)
Title: Improve specs for File.readlink

```
* Verify relative paths when changing the working directory work too
* Verify readlink succeeds even if the target does not exist
* An EINVAL should be raised when not a symlink
```

Hello,
This is my first contribution to rubyspec, so don't hesitate to tell me what's wrong.

I added the "when changing working directory" specs because MVM implementations might fail this while passing the rest of the spec (and it ensures the implementation behaves correctly with path expansion and relative paths).

mspec's `rm_r` does not work to remove a symlink pointing to a not existing target.
I'm not sure we can consider this a bug, but if it is it means `File.exist?` can not be trusted for this, and `Dir[]` or alike must be used.