3 describe :is_absolute_path do
4 let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
11 scope.function_is_absolute_path(function_args)
15 describe 'validate arity' do
16 let(:function_args) do
19 it "should raise a ParseError if there is more than 1 arguments" do
20 lambda { function }.should( raise_error(ArgumentError))
26 Puppet::Parser::Functions.function(subject).should == "function_#{subject}"
29 # help enforce good function defination
30 it 'should contain arity' do
34 it "should raise a ParseError if there is less than 1 arguments" do
35 lambda { function }.should( raise_error(ArgumentError))
39 describe 'should retrun true' do
45 let(:function_args) do
48 it 'should return data' do
49 function.should eq(return_value)
53 describe 'non-windows' do
54 let(:function_args) do
58 it 'should return data' do
59 function.should eq(return_value)
64 describe 'should return false' do
69 let(:function_args) do
72 it 'should return data' do
73 function.should eq(return_value)
77 describe 'non-windows' do
78 let(:function_args) do
81 it 'should return data' do
82 function.should eq(return_value)