diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2010-12-06 12:01:18 -0800 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2010-12-06 12:01:18 -0800 |
| commit | 626d7564467bdc0e9d2d385e9aa10c539d9ed175 (patch) | |
| tree | bff625caf757ccd42b3e8dd902214531efb41fdf /spec/unit/parser/functions | |
| parent | b9f3847cd2c7efb954f428224d8d721f9edafd64 (diff) | |
| download | puppet-626d7564467bdc0e9d2d385e9aa10c539d9ed175.tar.gz puppet-626d7564467bdc0e9d2d385e9aa10c539d9ed175.tar.xz puppet-626d7564467bdc0e9d2d385e9aa10c539d9ed175.zip | |
maint: Use expand_path when requiring spec_helper or puppettest
Doing a require to a relative path can cause files to be required more
than once when they're required from different relative paths. If you
expand the path fully, this won't happen. Ruby 1.9 also requires that
you use expand_path when doing these requires.
Paired-with: Jesse Wolfe
Diffstat (limited to 'spec/unit/parser/functions')
| -rwxr-xr-x | spec/unit/parser/functions/defined_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/extlookup_spec.rb | 2 | ||||
| -rw-r--r-- | spec/unit/parser/functions/fqdn_rand_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/generate_spec.rb | 2 | ||||
| -rw-r--r-- | spec/unit/parser/functions/include_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/inline_template_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/realize_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/regsubst_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/require_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/shellquote_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/split_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/sprintf_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/tag_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/template_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/versioncmp_spec.rb | 2 |
15 files changed, 15 insertions, 15 deletions
diff --git a/spec/unit/parser/functions/defined_spec.rb b/spec/unit/parser/functions/defined_spec.rb index cf3f66e17..0dd1dadb8 100755 --- a/spec/unit/parser/functions/defined_spec.rb +++ b/spec/unit/parser/functions/defined_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the 'defined' function" do diff --git a/spec/unit/parser/functions/extlookup_spec.rb b/spec/unit/parser/functions/extlookup_spec.rb index a3dcaa742..a476dc844 100755 --- a/spec/unit/parser/functions/extlookup_spec.rb +++ b/spec/unit/parser/functions/extlookup_spec.rb @@ -1,6 +1,6 @@ #! /usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') require 'tempfile' describe "the extlookup function" do diff --git a/spec/unit/parser/functions/fqdn_rand_spec.rb b/spec/unit/parser/functions/fqdn_rand_spec.rb index 81c12c6a7..151ebac9a 100644 --- a/spec/unit/parser/functions/fqdn_rand_spec.rb +++ b/spec/unit/parser/functions/fqdn_rand_spec.rb @@ -1,6 +1,6 @@ #! /usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the fqdn_rand function" do diff --git a/spec/unit/parser/functions/generate_spec.rb b/spec/unit/parser/functions/generate_spec.rb index 27aabe261..12f454210 100755 --- a/spec/unit/parser/functions/generate_spec.rb +++ b/spec/unit/parser/functions/generate_spec.rb @@ -1,6 +1,6 @@ #! /usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the generate function" do diff --git a/spec/unit/parser/functions/include_spec.rb b/spec/unit/parser/functions/include_spec.rb index 4f609b055..67227e7d9 100644 --- a/spec/unit/parser/functions/include_spec.rb +++ b/spec/unit/parser/functions/include_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the 'include' function" do diff --git a/spec/unit/parser/functions/inline_template_spec.rb b/spec/unit/parser/functions/inline_template_spec.rb index 62f389e5d..36d53778d 100755 --- a/spec/unit/parser/functions/inline_template_spec.rb +++ b/spec/unit/parser/functions/inline_template_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the inline_template function" do diff --git a/spec/unit/parser/functions/realize_spec.rb b/spec/unit/parser/functions/realize_spec.rb index 82f4fa251..899f69b01 100755 --- a/spec/unit/parser/functions/realize_spec.rb +++ b/spec/unit/parser/functions/realize_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the realize function" do diff --git a/spec/unit/parser/functions/regsubst_spec.rb b/spec/unit/parser/functions/regsubst_spec.rb index 47126dd7a..09aa92d28 100755 --- a/spec/unit/parser/functions/regsubst_spec.rb +++ b/spec/unit/parser/functions/regsubst_spec.rb @@ -1,6 +1,6 @@ #! /usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the regsubst function" do diff --git a/spec/unit/parser/functions/require_spec.rb b/spec/unit/parser/functions/require_spec.rb index 49c4bbf74..4afbd5a63 100755 --- a/spec/unit/parser/functions/require_spec.rb +++ b/spec/unit/parser/functions/require_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the require function" do diff --git a/spec/unit/parser/functions/shellquote_spec.rb b/spec/unit/parser/functions/shellquote_spec.rb index 46b9f8d10..c8b0d650d 100755 --- a/spec/unit/parser/functions/shellquote_spec.rb +++ b/spec/unit/parser/functions/shellquote_spec.rb @@ -1,6 +1,6 @@ #! /usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the shellquote function" do diff --git a/spec/unit/parser/functions/split_spec.rb b/spec/unit/parser/functions/split_spec.rb index a1c83bb0f..39710003b 100755 --- a/spec/unit/parser/functions/split_spec.rb +++ b/spec/unit/parser/functions/split_spec.rb @@ -1,6 +1,6 @@ #! /usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the split function" do diff --git a/spec/unit/parser/functions/sprintf_spec.rb b/spec/unit/parser/functions/sprintf_spec.rb index 01545a879..4f29012b3 100755 --- a/spec/unit/parser/functions/sprintf_spec.rb +++ b/spec/unit/parser/functions/sprintf_spec.rb @@ -1,6 +1,6 @@ #! /usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the sprintf function" do diff --git a/spec/unit/parser/functions/tag_spec.rb b/spec/unit/parser/functions/tag_spec.rb index dac134134..e9b5122c7 100755 --- a/spec/unit/parser/functions/tag_spec.rb +++ b/spec/unit/parser/functions/tag_spec.rb @@ -1,6 +1,6 @@ #! /usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the 'tag' function" do diff --git a/spec/unit/parser/functions/template_spec.rb b/spec/unit/parser/functions/template_spec.rb index 096b0598e..9dd5cc947 100755 --- a/spec/unit/parser/functions/template_spec.rb +++ b/spec/unit/parser/functions/template_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the template function" do diff --git a/spec/unit/parser/functions/versioncmp_spec.rb b/spec/unit/parser/functions/versioncmp_spec.rb index 380c6307a..2bc7be801 100755 --- a/spec/unit/parser/functions/versioncmp_spec.rb +++ b/spec/unit/parser/functions/versioncmp_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../../spec_helper' +require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe "the versioncmp function" do |
