Sha256: 9263d942329186714ea5fb4522461a2124c3a2c662d2cdb5e3725aadf4ccdaa0
Contents?: true
Size: 629 Bytes
Versions: 18
Compression:
Stored size: 629 Bytes
Contents
#! /usr/bin/env ruby require File.dirname(__FILE__) + '/../../../spec_helper' describe "the 'tag' function" do before :each do @scope = Puppet::Parser::Scope.new @scope.stubs(:environment).returns(nil) 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
18 entries across 18 versions & 1 rubygems