Sha256: e757b8e08b30b2d6e30f858cfe9d8f2c6133b1a22206d3ad3e8f8dddc0dec3ca
Contents?: true
Size: 972 Bytes
Versions: 1
Compression:
Stored size: 972 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") } checksum = Puppet::Type.type(:file).attrclass(:checksum) describe checksum do before do # Wow that's a messy interface to the resource. @resource = stub 'resource', :[] => nil, :[]= => nil, :property => nil, :newattr => nil, :parameter => nil end it "should be a subclass of Property" do checksum.superclass.must == Puppet::Property end it "should have default checksum of :md5" do @checksum = checksum.new(:resource => @resource) @checksum.checktype.should == :md5 end [:none, nil, ""].each do |ck| it "should use a none checksum for #{ck.inspect}" do @checksum = checksum.new(:resource => @resource) @checksum.should = "none" @checksum.checktype.should == :none end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.25.5 | spec/unit/type/file/checksum.rb |