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