1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
4 describe 'dirname function' do
6 context 'absolute path' do
7 it 'returns the dirname' do
9 $a = '/path/to/a/file.txt'
13 notify { 'output correct': }
17 apply_manifest(pp, :catch_failures => true) do |r|
18 expect(r.stdout).to match(/Notice: output correct/)
22 context 'relative path' do
23 it 'returns the dirname' do
25 $a = 'path/to/a/file.txt'
29 notify { 'output correct': }
33 apply_manifest(pp, :catch_failures => true) do |r|
34 expect(r.stdout).to match(/Notice: output correct/)
40 it 'handles improper argument counts'