summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
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/transaction_spec.rb24
-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
10 files changed, 18 insertions, 25 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/transaction_spec.rb b/spec/integration/transaction_spec.rb
index b5080b5c6..ff15e597d 100755
--- a/spec/integration/transaction_spec.rb
+++ b/spec/integration/transaction_spec.rb
@@ -107,29 +107,23 @@ describe Puppet::Transaction do
file1 = tmpfile("file1")
file2 = tmpfile("file2")
- file = Puppet::Type.type(:file).new(
-
- :path => path,
-
+ file = Puppet::Type.type(:file).new(
+ :path => path,
:ensure => "file"
)
- exec1 = Puppet::Type.type(:exec).new(
-
- :path => ENV["PATH"],
+ exec1 = Puppet::Type.type(:exec).new(
+ :path => ENV["PATH"],
:command => "touch #{file1}",
:refreshonly => true,
-
- :subscribe => Puppet::Resource.new(:file, path)
+ :subscribe => Puppet::Resource.new(:file, path)
)
- exec2 = Puppet::Type.type(:exec).new(
-
- :path => ENV["PATH"],
- :command => "touch #{file2}",
+ exec2 = Puppet::Type.type(:exec).new(
+ :path => ENV["PATH"],
+ :command => "touch #{file2}",
:refreshonly => true,
-
- :subscribe => Puppet::Resource.new(:file, path)
+ :subscribe => Puppet::Resource.new(:file, path)
)
catalog = mk_catalog(file, exec1, exec2)
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'