puppetlabs/puppetlabs_spec_helper — pull request #85 by Iristyle (2014-12-12 22:09:15+00:00)
Title: Fix symlink support for older Puppet versions

- In commit dc4e8aebb61a32292bc2bf27b31a422902878294, a change was
introduced to enable the 'spec_prep' task to work properly on
Windows. Unfortunately this was done without appropriate
consideration for the versions of Puppet that spec_helper need to
support, and Puppet::FileSystem symlink support was added in Puppet
3.5, via https://github.com/puppetlabs/puppet/commit/938b4e7d495f5f15557110040458171e832cecf2

While it's true that the symlink code was initially added to Puppet
in 3.4, we'll not take that into consideration and just rely
on the existence of Puppet::FileSystem as our heuristic for
Windows symlink support (given the code was structured differently
in prior versions)

Additionally emit an upgrade failure on Windows when symlinks are not
supported.

The is_windows check is equivalent to how Puppet and Ruby itself
test for Windows.