summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/ast
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/ast
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/ast')
-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
26 files changed, 26 insertions, 26 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