Sha256: 7c2aba7cd4317fbb6533d05923b18f906c472827647d9ff8cb426714bbf1c6ba

Contents?: true

Size: 742 Bytes

Versions: 33

Compression:

Stored size: 742 Bytes

Contents

#!/usr/bin/env rspec
require 'spec_helper'

require 'puppet_spec/files'
require 'puppet/file_bucket/dipper'

describe Puppet::Type.type(:tidy) do
  include PuppetSpec::Files

  before do
    Puppet::Util::Storage.stubs(:store)
  end

  # Testing #355.
  it "should be able to remove dead links", :unless => Puppet.features.microsoft_windows? do
    dir = tmpfile("tidy_link_testing")
    link = File.join(dir, "link")
    target = tmpfile("no_such_file_tidy_link_testing")
    Dir.mkdir(dir)
    File.symlink(target, link)

    tidy = Puppet::Type.type(:tidy).new :path => dir, :recurse => true

    catalog = Puppet::Resource::Catalog.new
    catalog.add_resource(tidy)

    catalog.apply

    FileTest.should_not be_symlink(link)
  end
end

Version data entries

33 entries across 33 versions & 3 rubygems

Version Path
puppet-2.7.26 spec/integration/type/tidy_spec.rb
puppet-2.7.25 spec/integration/type/tidy_spec.rb
puppet-2.7.24 spec/integration/type/tidy_spec.rb
puppet-2.7.23 spec/integration/type/tidy_spec.rb
puppet-2.7.22 spec/integration/type/tidy_spec.rb
puppet-2.7.21 spec/integration/type/tidy_spec.rb
puppet-2.7.20 spec/integration/type/tidy_spec.rb
puppet-2.7.20.rc1 spec/integration/type/tidy_spec.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/spec/integration/type/tidy_spec.rb
puppet-2.7.19 spec/integration/type/tidy_spec.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/spec/integration/type/tidy_spec.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/spec/integration/type/tidy_spec.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/spec/integration/type/tidy_spec.rb
puppet-2.7.18 spec/integration/type/tidy_spec.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/spec/integration/type/tidy_spec.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/spec/integration/type/tidy_spec.rb
puppet-2.7.17 spec/integration/type/tidy_spec.rb
puppet-2.7.16 spec/integration/type/tidy_spec.rb
puppet-2.7.14 spec/integration/type/tidy_spec.rb
puppet-2.7.13 spec/integration/type/tidy_spec.rb