Sha256: d0a2cc592c62ba314c85f0a8022671721746c8fadfd2735438a7ede47828fb9a

Contents?: true

Size: 579 Bytes

Versions: 14

Compression:

Stored size: 579 Bytes

Contents

#!/usr/bin/env ruby

Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }

describe Puppet::Type.type(:file).attrclass(:type) do
  require 'puppet_spec/files'
  include PuppetSpec::Files

  before do
    @filename = tmpfile('type')
    @resource = Puppet::Type.type(:file).new({:name => @filename})
  end

  it "should prevent the user from trying to set the type" do
    lambda {
      @resource[:type] = "fifo"
    }.should raise_error(Puppet::Error, /type is read-only/)
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
puppet-2.6.18 spec/unit/type/file/type.rb
puppet-2.6.17 spec/unit/type/file/type.rb
puppet-2.6.16 spec/unit/type/file/type.rb
puppet-2.6.15 spec/unit/type/file/type.rb
puppet-2.6.14 spec/unit/type/file/type.rb
puppet-2.6.13 spec/unit/type/file/type.rb
puppet-2.6.12 spec/unit/type/file/type.rb
puppet-2.6.11 spec/unit/type/file/type.rb
puppet-2.6.10 spec/unit/type/file/type.rb
puppet-2.6.9 spec/unit/type/file/type.rb
puppet-2.6.8 spec/unit/type/file/type.rb
puppet-2.6.7 spec/unit/type/file/type.rb
puppet-2.6.6 spec/unit/type/file/type.rb
puppet-2.6.5 spec/unit/type/file/type.rb