summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-03-22 11:41:53 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-03-22 11:41:53 -0700
commit6bf5b7fea8ef4d04809e78eef84029a0773d4747 (patch)
treecc264fef5811c7d5e8000bc4048bab86b87064a0 /spec/integration
parente80063468e404a6827ea6ec458ae34ca84619eed (diff)
parentf6da3339f59bbd9243a03dc1e417b1fed7955c7e (diff)
downloadpuppet-6bf5b7fea8ef4d04809e78eef84029a0773d4747.tar.gz
puppet-6bf5b7fea8ef4d04809e78eef84029a0773d4747.tar.xz
puppet-6bf5b7fea8ef4d04809e78eef84029a0773d4747.zip
Merge branch 'ticket/next/maint-fix_require_spec_helper_for_ruby_19' into next
* ticket/next/maint-fix_require_spec_helper_for_ruby_19: maint: Change code for finding spec_helper to work with Ruby 1.9 Fix error "invalid multibyte char (US-ASCII)" under Ruby 1.9
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/indirector/catalog/compiler_spec.rb2
-rwxr-xr-xspec/integration/indirector/catalog/queue_spec.rb2
-rwxr-xr-xspec/integration/provider/package_spec.rb2
-rwxr-xr-xspec/integration/provider/service/init_spec.rb3
-rwxr-xr-xspec/integration/reference/providers_spec.rb2
-rwxr-xr-xspec/integration/util/autoload_spec.rb2
-rwxr-xr-xspec/integration/util/feature_spec.rb2
-rwxr-xr-xspec/integration/util/file_locking_spec.rb2
-rwxr-xr-xspec/integration/util/rdoc/parser_spec.rb2
9 files changed, 9 insertions, 10 deletions
diff --git a/spec/integration/indirector/catalog/compiler_spec.rb b/spec/integration/indirector/catalog/compiler_spec.rb
index dcb7eb425..1146c20b0 100755
--- a/spec/integration/indirector/catalog/compiler_spec.rb
+++ b/spec/integration/indirector/catalog/compiler_spec.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
+require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
require 'puppet/resource/catalog'
diff --git a/spec/integration/indirector/catalog/queue_spec.rb b/spec/integration/indirector/catalog/queue_spec.rb
index 4581e3062..237e489f9 100755
--- a/spec/integration/indirector/catalog/queue_spec.rb
+++ b/spec/integration/indirector/catalog/queue_spec.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
+require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
require 'puppet/resource/catalog'
diff --git a/spec/integration/provider/package_spec.rb b/spec/integration/provider/package_spec.rb
index 472662d6b..cc03c57a7 100755
--- a/spec/integration/provider/package_spec.rb
+++ b/spec/integration/provider/package_spec.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe "Package Provider" do
Puppet::Type.type(:package).providers.each do |name|
diff --git a/spec/integration/provider/service/init_spec.rb b/spec/integration/provider/service/init_spec.rb
index 2e2505bd4..c74ce29fe 100755
--- a/spec/integration/provider/service/init_spec.rb
+++ b/spec/integration/provider/service/init_spec.rb
@@ -1,7 +1,6 @@
#!/usr/bin/env ruby
-# Find and load the spec file.
-Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
+require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
provider = Puppet::Type.type(:service).provider(:init)
diff --git a/spec/integration/reference/providers_spec.rb b/spec/integration/reference/providers_spec.rb
index c2b1e17c5..d6e19cb59 100755
--- a/spec/integration/reference/providers_spec.rb
+++ b/spec/integration/reference/providers_spec.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'puppet/util/reference'
diff --git a/spec/integration/util/autoload_spec.rb b/spec/integration/util/autoload_spec.rb
index 8a5d66232..f9b913502 100755
--- a/spec/integration/util/autoload_spec.rb
+++ b/spec/integration/util/autoload_spec.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'puppet/util/autoload'
require 'fileutils'
diff --git a/spec/integration/util/feature_spec.rb b/spec/integration/util/feature_spec.rb
index f1ada9057..b038cf308 100755
--- a/spec/integration/util/feature_spec.rb
+++ b/spec/integration/util/feature_spec.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'puppet/util/feature'
require 'puppet_spec/files'
diff --git a/spec/integration/util/file_locking_spec.rb b/spec/integration/util/file_locking_spec.rb
index 50613448b..1914fadf7 100755
--- a/spec/integration/util/file_locking_spec.rb
+++ b/spec/integration/util/file_locking_spec.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'puppet/util/file_locking'
diff --git a/spec/integration/util/rdoc/parser_spec.rb b/spec/integration/util/rdoc/parser_spec.rb
index 7d3b0ec3e..9cb0c9e4a 100755
--- a/spec/integration/util/rdoc/parser_spec.rb
+++ b/spec/integration/util/rdoc/parser_spec.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
+require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
require 'puppet/resource/type_collection'
require 'puppet/util/rdoc/parser'