From b5fce3cce34c5ff01243a4dfe9205d26f3c98857 Mon Sep 17 00:00:00 2001 From: crayfishx Date: Wed, 11 Jul 2012 10:51:18 -0700 Subject: Fully qualify $::caller_module_name fact. This fixes the following failed test: 1) tftp::file when deploying file from another module Failure/Error: }) expected that the catalogue would contain File[/srv/tftp/sample] with source set to `"puppet:///modules/acme/sample"` but it is set to `"puppet:///modules/tftp/sample"` in the catalogue # ./spec/defines/tftp_file_spec.rb:138 --- manifests/file.pp | 4 ++-- spec/fixtures/manifests/site.pp | 0 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 spec/fixtures/manifests/site.pp diff --git a/manifests/file.pp b/manifests/file.pp index 3628188..6eaa394 100644 --- a/manifests/file.pp +++ b/manifests/file.pp @@ -44,8 +44,8 @@ define tftp::file ( if $source { $source_real = $source } elsif $ensure != 'directory' and ! $content { - if $caller_module_name { - $mod = $caller_module_name + if $::caller_module_name { + $mod = $::caller_module_name } else { $mod = $module_name } diff --git a/spec/fixtures/manifests/site.pp b/spec/fixtures/manifests/site.pp deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3