summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2010-12-06 12:01:18 -0800
committerMatt Robinson <matt@puppetlabs.com>2010-12-06 12:01:18 -0800
commit626d7564467bdc0e9d2d385e9aa10c539d9ed175 (patch)
treebff625caf757ccd42b3e8dd902214531efb41fdf /spec/unit/parser
parentb9f3847cd2c7efb954f428224d8d721f9edafd64 (diff)
downloadpuppet-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')
-rwxr-xr-xspec/unit/parser/ast/arithmetic_operator_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/astarray_spec.rb2
-rw-r--r--spec/unit/parser/ast/asthash_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/boolean_operator_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/casestatement_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/collection_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/collexpr_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/comparison_operator_spec.rb2
-rw-r--r--spec/unit/parser/ast/definition_spec.rb2
-rw-r--r--spec/unit/parser/ast/function_spec.rb2
-rw-r--r--spec/unit/parser/ast/hostclass_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/ifstatement_spec.rb2
-rw-r--r--spec/unit/parser/ast/in_operator_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/leaf_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/match_operator_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/minus_spec.rb2
-rw-r--r--spec/unit/parser/ast/node_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/nop_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/not_spec.rb2
-rw-r--r--spec/unit/parser/ast/relationship_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/resource_defaults_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/resource_override_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/resource_reference_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/resource_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/selector_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/vardef_spec.rb2
-rw-r--r--spec/unit/parser/ast_spec.rb2
-rwxr-xr-xspec/unit/parser/collector_spec.rb2
-rwxr-xr-xspec/unit/parser/compiler_spec.rb2
-rw-r--r--spec/unit/parser/files_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/defined_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/extlookup_spec.rb2
-rw-r--r--spec/unit/parser/functions/fqdn_rand_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/generate_spec.rb2
-rw-r--r--spec/unit/parser/functions/include_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/inline_template_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/realize_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/regsubst_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/require_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/shellquote_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/split_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/sprintf_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/tag_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/template_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/versioncmp_spec.rb2
-rw-r--r--spec/unit/parser/functions_spec.rb2
-rwxr-xr-xspec/unit/parser/lexer_spec.rb2
-rwxr-xr-xspec/unit/parser/parser_spec.rb2
-rw-r--r--spec/unit/parser/relationship_spec.rb2
-rwxr-xr-xspec/unit/parser/resource_spec.rb2
-rwxr-xr-xspec/unit/parser/scope_spec.rb2
-rwxr-xr-xspec/unit/parser/templatewrapper_spec.rb2
-rw-r--r--spec/unit/parser/type_loader_spec.rb2
53 files changed, 53 insertions, 53 deletions
diff --git a/spec/unit/parser/ast/arithmetic_operator_spec.rb b/spec/unit/parser/ast/arithmetic_operator_spec.rb
index 093cf94f1..381c5c629 100755
--- a/spec/unit/parser/ast/arithmetic_operator_spec.rb
+++ b/spec/unit/parser/ast/arithmetic_operator_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 Puppet::Parser::AST::ArithmeticOperator do
diff --git a/spec/unit/parser/ast/astarray_spec.rb b/spec/unit/parser/ast/astarray_spec.rb
index 8794848b6..01082b3f0 100755
--- a/spec/unit/parser/ast/astarray_spec.rb
+++ b/spec/unit/parser/ast/astarray_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 Puppet::Parser::AST::ASTArray do
before :each do
diff --git a/spec/unit/parser/ast/asthash_spec.rb b/spec/unit/parser/ast/asthash_spec.rb
index c70553c56..83f604545 100644
--- a/spec/unit/parser/ast/asthash_spec.rb
+++ b/spec/unit/parser/ast/asthash_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 Puppet::Parser::AST::ASTHash do
before :each do
diff --git a/spec/unit/parser/ast/boolean_operator_spec.rb b/spec/unit/parser/ast/boolean_operator_spec.rb
index 10e987e31..529946694 100755
--- a/spec/unit/parser/ast/boolean_operator_spec.rb
+++ b/spec/unit/parser/ast/boolean_operator_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 Puppet::Parser::AST::BooleanOperator do
diff --git a/spec/unit/parser/ast/casestatement_spec.rb b/spec/unit/parser/ast/casestatement_spec.rb
index 4d79e54cb..a77c04c43 100755
--- a/spec/unit/parser/ast/casestatement_spec.rb
+++ b/spec/unit/parser/ast/casestatement_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 Puppet::Parser::AST::CaseStatement do
before :each do
diff --git a/spec/unit/parser/ast/collection_spec.rb b/spec/unit/parser/ast/collection_spec.rb
index 392a2c0f0..a495bca15 100755
--- a/spec/unit/parser/ast/collection_spec.rb
+++ b/spec/unit/parser/ast/collection_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 Puppet::Parser::AST::Collection do
before :each do
diff --git a/spec/unit/parser/ast/collexpr_spec.rb b/spec/unit/parser/ast/collexpr_spec.rb
index 01276dfb3..04ce69cd3 100755
--- a/spec/unit/parser/ast/collexpr_spec.rb
+++ b/spec/unit/parser/ast/collexpr_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 Puppet::Parser::AST::CollExpr do
diff --git a/spec/unit/parser/ast/comparison_operator_spec.rb b/spec/unit/parser/ast/comparison_operator_spec.rb
index 931f936df..03c9069cb 100755
--- a/spec/unit/parser/ast/comparison_operator_spec.rb
+++ b/spec/unit/parser/ast/comparison_operator_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 Puppet::Parser::AST::ComparisonOperator do
before :each do
diff --git a/spec/unit/parser/ast/definition_spec.rb b/spec/unit/parser/ast/definition_spec.rb
index b7b2c851c..e7f55d258 100644
--- a/spec/unit/parser/ast/definition_spec.rb
+++ b/spec/unit/parser/ast/definition_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 Puppet::Parser::AST::Definition do
it "should make its context available through an accessor" do
diff --git a/spec/unit/parser/ast/function_spec.rb b/spec/unit/parser/ast/function_spec.rb
index 38e344157..cd4b0f94e 100644
--- a/spec/unit/parser/ast/function_spec.rb
+++ b/spec/unit/parser/ast/function_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 Puppet::Parser::AST::Function do
before :each do
diff --git a/spec/unit/parser/ast/hostclass_spec.rb b/spec/unit/parser/ast/hostclass_spec.rb
index b22eba98b..390490788 100644
--- a/spec/unit/parser/ast/hostclass_spec.rb
+++ b/spec/unit/parser/ast/hostclass_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 Puppet::Parser::AST::Hostclass do
def ast
diff --git a/spec/unit/parser/ast/ifstatement_spec.rb b/spec/unit/parser/ast/ifstatement_spec.rb
index 2a9e1e37b..6a2fed22c 100755
--- a/spec/unit/parser/ast/ifstatement_spec.rb
+++ b/spec/unit/parser/ast/ifstatement_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 Puppet::Parser::AST::IfStatement do
before :each do
diff --git a/spec/unit/parser/ast/in_operator_spec.rb b/spec/unit/parser/ast/in_operator_spec.rb
index aebe442ab..08c01582e 100644
--- a/spec/unit/parser/ast/in_operator_spec.rb
+++ b/spec/unit/parser/ast/in_operator_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 'puppet/parser/ast/in_operator'
diff --git a/spec/unit/parser/ast/leaf_spec.rb b/spec/unit/parser/ast/leaf_spec.rb
index a19c24115..2119a27a8 100755
--- a/spec/unit/parser/ast/leaf_spec.rb
+++ b/spec/unit/parser/ast/leaf_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 Puppet::Parser::AST::Leaf do
before :each do
diff --git a/spec/unit/parser/ast/match_operator_spec.rb b/spec/unit/parser/ast/match_operator_spec.rb
index d6e998751..f2a68b676 100755
--- a/spec/unit/parser/ast/match_operator_spec.rb
+++ b/spec/unit/parser/ast/match_operator_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 Puppet::Parser::AST::MatchOperator do
before :each do
diff --git a/spec/unit/parser/ast/minus_spec.rb b/spec/unit/parser/ast/minus_spec.rb
index 108c8812e..339087e80 100755
--- a/spec/unit/parser/ast/minus_spec.rb
+++ b/spec/unit/parser/ast/minus_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 Puppet::Parser::AST::Minus do
before :each do
diff --git a/spec/unit/parser/ast/node_spec.rb b/spec/unit/parser/ast/node_spec.rb
index 3e8017de0..c4e20ca67 100644
--- a/spec/unit/parser/ast/node_spec.rb
+++ b/spec/unit/parser/ast/node_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 Puppet::Parser::AST::Node do
describe "when instantiated" do
diff --git a/spec/unit/parser/ast/nop_spec.rb b/spec/unit/parser/ast/nop_spec.rb
index 3e493197a..3fa2fc0ee 100755
--- a/spec/unit/parser/ast/nop_spec.rb
+++ b/spec/unit/parser/ast/nop_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 Puppet::Parser::AST::Nop do
diff --git a/spec/unit/parser/ast/not_spec.rb b/spec/unit/parser/ast/not_spec.rb
index 2ef6e0689..31a425132 100755
--- a/spec/unit/parser/ast/not_spec.rb
+++ b/spec/unit/parser/ast/not_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 Puppet::Parser::AST::Not do
before :each do
diff --git a/spec/unit/parser/ast/relationship_spec.rb b/spec/unit/parser/ast/relationship_spec.rb
index 2a0f658df..d8bc3a535 100644
--- a/spec/unit/parser/ast/relationship_spec.rb
+++ b/spec/unit/parser/ast/relationship_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 Puppet::Parser::AST::Relationship do
before do
diff --git a/spec/unit/parser/ast/resource_defaults_spec.rb b/spec/unit/parser/ast/resource_defaults_spec.rb
index 7843fd9a9..36eb8df5f 100755
--- a/spec/unit/parser/ast/resource_defaults_spec.rb
+++ b/spec/unit/parser/ast/resource_defaults_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 Puppet::Parser::AST::ResourceDefaults do
diff --git a/spec/unit/parser/ast/resource_override_spec.rb b/spec/unit/parser/ast/resource_override_spec.rb
index 637ab41fc..7ca3a7e8c 100755
--- a/spec/unit/parser/ast/resource_override_spec.rb
+++ b/spec/unit/parser/ast/resource_override_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 Puppet::Parser::AST::ResourceOverride do
diff --git a/spec/unit/parser/ast/resource_reference_spec.rb b/spec/unit/parser/ast/resource_reference_spec.rb
index 93419d963..492c25490 100755
--- a/spec/unit/parser/ast/resource_reference_spec.rb
+++ b/spec/unit/parser/ast/resource_reference_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 Puppet::Parser::AST::ResourceReference do
diff --git a/spec/unit/parser/ast/resource_spec.rb b/spec/unit/parser/ast/resource_spec.rb
index 3f7fa229a..b00fee587 100755
--- a/spec/unit/parser/ast/resource_spec.rb
+++ b/spec/unit/parser/ast/resource_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 Puppet::Parser::AST::Resource do
ast = Puppet::Parser::AST
diff --git a/spec/unit/parser/ast/selector_spec.rb b/spec/unit/parser/ast/selector_spec.rb
index 42898475f..4c13aa7ba 100755
--- a/spec/unit/parser/ast/selector_spec.rb
+++ b/spec/unit/parser/ast/selector_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 Puppet::Parser::AST::Selector do
before :each do
diff --git a/spec/unit/parser/ast/vardef_spec.rb b/spec/unit/parser/ast/vardef_spec.rb
index a90010f5a..9c8b77905 100755
--- a/spec/unit/parser/ast/vardef_spec.rb
+++ b/spec/unit/parser/ast/vardef_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 Puppet::Parser::AST::VarDef do
before :each do
diff --git a/spec/unit/parser/ast_spec.rb b/spec/unit/parser/ast_spec.rb
index 29dce2b9c..cdfb51869 100644
--- a/spec/unit/parser/ast_spec.rb
+++ b/spec/unit/parser/ast_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 'puppet/parser/ast'
diff --git a/spec/unit/parser/collector_spec.rb b/spec/unit/parser/collector_spec.rb
index 908cda63a..ff81795c4 100755
--- a/spec/unit/parser/collector_spec.rb
+++ b/spec/unit/parser/collector_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 'puppet/rails'
require 'puppet/parser/collector'
diff --git a/spec/unit/parser/compiler_spec.rb b/spec/unit/parser/compiler_spec.rb
index 95f3853e2..3a7c0b222 100755
--- a/spec/unit/parser/compiler_spec.rb
+++ b/spec/unit/parser/compiler_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')
class CompilerTestResource
attr_accessor :builtin, :virtual, :evaluated, :type, :title
diff --git a/spec/unit/parser/files_spec.rb b/spec/unit/parser/files_spec.rb
index 3eb0db07e..525c83697 100644
--- a/spec/unit/parser/files_spec.rb
+++ b/spec/unit/parser/files_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 'puppet/parser/files'
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
diff --git a/spec/unit/parser/functions_spec.rb b/spec/unit/parser/functions_spec.rb
index 18aee4b65..51e52faee 100644
--- a/spec/unit/parser/functions_spec.rb
+++ b/spec/unit/parser/functions_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 Puppet::Parser::Functions do
diff --git a/spec/unit/parser/lexer_spec.rb b/spec/unit/parser/lexer_spec.rb
index d52add399..67d75823b 100755
--- a/spec/unit/parser/lexer_spec.rb
+++ b/spec/unit/parser/lexer_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 'puppet/parser/lexer'
diff --git a/spec/unit/parser/parser_spec.rb b/spec/unit/parser/parser_spec.rb
index ab43194e9..f5df3041c 100755
--- a/spec/unit/parser/parser_spec.rb
+++ b/spec/unit/parser/parser_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 Puppet::Parser do
diff --git a/spec/unit/parser/relationship_spec.rb b/spec/unit/parser/relationship_spec.rb
index 57f1a772b..883a38d11 100644
--- a/spec/unit/parser/relationship_spec.rb
+++ b/spec/unit/parser/relationship_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 'puppet/parser/relationship'
diff --git a/spec/unit/parser/resource_spec.rb b/spec/unit/parser/resource_spec.rb
index dae22fcaa..73c4412dd 100755
--- a/spec/unit/parser/resource_spec.rb
+++ b/spec/unit/parser/resource_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')
# LAK: FIXME This is just new tests for resources; I have
# not moved all tests over yet.
diff --git a/spec/unit/parser/scope_spec.rb b/spec/unit/parser/scope_spec.rb
index 2e390a53b..32a87f1f4 100755
--- a/spec/unit/parser/scope_spec.rb
+++ b/spec/unit/parser/scope_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 Puppet::Parser::Scope do
before :each do
diff --git a/spec/unit/parser/templatewrapper_spec.rb b/spec/unit/parser/templatewrapper_spec.rb
index 68d90a1cc..aab169348 100755
--- a/spec/unit/parser/templatewrapper_spec.rb
+++ b/spec/unit/parser/templatewrapper_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 'puppet/parser/templatewrapper'
describe Puppet::Parser::TemplateWrapper do
diff --git a/spec/unit/parser/type_loader_spec.rb b/spec/unit/parser/type_loader_spec.rb
index cfa68871d..bd41adfb6 100644
--- a/spec/unit/parser/type_loader_spec.rb
+++ b/spec/unit/parser/type_loader_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 'puppet/parser/type_loader'
require 'puppet_spec/files'