Sha256: a9007c329c42a2710c67dab30034cfca95011157ec06ccb278f129e0a1468cc9
Contents?: true
Size: 737 Bytes
Versions: 4
Compression:
Stored size: 737 Bytes
Contents
#! /usr/bin/env ruby -S rspec require 'spec_helper' describe "the 'tag' function" do before :all do Puppet::Parser::Functions.autoloader.loadall end before :each do node = Puppet::Node.new('localhost') compiler = Puppet::Parser::Compiler.new(node) @scope = Puppet::Parser::Scope.new(compiler) end it "should exist" do Puppet::Parser::Functions.function(:tag).should == "function_tag" end it "should tag the resource with any provided tags" do resource = Puppet::Parser::Resource.new(:file, "/file", :scope => @scope) @scope.expects(:resource).returns resource @scope.function_tag ["one", "two"] resource.should be_tagged("one") resource.should be_tagged("two") end end
Version data entries
4 entries across 4 versions & 1 rubygems