Sha256: e728175c45558cd1c1f5dd00fd0d8237efe93d9e3df0dec3e503fc57dfdc5194

Contents?: true

Size: 742 Bytes

Versions: 29

Compression:

Stored size: 742 Bytes

Contents

#! /usr/bin/env ruby
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

29 entries across 29 versions & 2 rubygems

Version Path
puppet-3.3.2 spec/integration/type/tidy_spec.rb
puppet-3.3.1 spec/integration/type/tidy_spec.rb
puppet-3.3.1.rc3 spec/integration/type/tidy_spec.rb
puppet-3.3.1.rc2 spec/integration/type/tidy_spec.rb
puppet-3.3.1.rc1 spec/integration/type/tidy_spec.rb
puppet-3.3.0 spec/integration/type/tidy_spec.rb
puppet-3.3.0.rc3 spec/integration/type/tidy_spec.rb
puppet-3.3.0.rc2 spec/integration/type/tidy_spec.rb
puppet-3.2.4 spec/integration/type/tidy_spec.rb
puppet-3.2.3 spec/integration/type/tidy_spec.rb
puppet-3.2.3.rc1 spec/integration/type/tidy_spec.rb
puppet-3.2.2 spec/integration/type/tidy_spec.rb
puppet-3.2.1 spec/integration/type/tidy_spec.rb
puppet-3.2.1.rc1 spec/integration/type/tidy_spec.rb
puppet-3.2.0.rc2 spec/integration/type/tidy_spec.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/puppet-3.1.0/spec/integration/type/tidy_spec.rb
puppet-3.2.0.rc1 spec/integration/type/tidy_spec.rb
puppet-3.1.1 spec/integration/type/tidy_spec.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/puppet-3.1.0/spec/integration/type/tidy_spec.rb
puppet-3.1.0 spec/integration/type/tidy_spec.rb