Sha256: d095e76b5b3b8e1665b2ed37adb829ebf44cff4a08dcb72cbc9bf0d5ea486f58

Contents?: true

Size: 463 Bytes

Versions: 4

Compression:

Stored size: 463 Bytes

Contents

#! /usr/bin/env ruby -S rspec
require 'spec_helper'

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

4 entries across 4 versions & 1 rubygems

Version Path
puppet-3.0.0.rc8 spec/unit/type/file/type_spec.rb
puppet-3.0.0.rc7 spec/unit/type/file/type_spec.rb
puppet-3.0.0.rc5 spec/unit/type/file/type_spec.rb
puppet-3.0.0.rc4 spec/unit/type/file/type_spec.rb