Sha256: 2e299c3dc45e6f4797483610c33731b58f3b20abae516a9fe020ec546dbf33ca
Contents?: true
Size: 767 Bytes
Versions: 39
Compression:
Stored size: 767 Bytes
Contents
#!/usr/bin/env rspec require 'spec_helper' describe "the digest function", :uses_checksums => true do before :all do Puppet::Parser::Functions.autoloader.loadall end before :each do n = Puppet::Node.new('unnamed') c = Puppet::Parser::Compiler.new(n) @scope = Puppet::Parser::Scope.new(c) end it "should exist" do Puppet::Parser::Functions.function("digest").should == "function_digest" end with_digest_algorithms do it "should use the proper digest function" do result = @scope.function_digest([plaintext]) result.should(eql( checksum )) end it "should only accept one parameter" do expect do @scope.function_digest(['foo', 'bar']) end.to raise_error(ArgumentError) end end end
Version data entries
39 entries across 39 versions & 1 rubygems