summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@rimspace.net>2011-01-27 17:14:23 -0800
committerDaniel Pittman <daniel@rimspace.net>2011-01-27 17:18:13 -0800
commitb39f8923e9772c2e8c99ca9351114d63d2858cc9 (patch)
tree3d15e00ed929eaa886795095f3203470dad7e2ab /spec/unit
parenta4fe4598b681b75f5dc66e8193cefbf069cac728 (diff)
downloadfacter-b39f8923e9772c2e8c99ca9351114d63d2858cc9.tar.gz
facter-b39f8923e9772c2e8c99ca9351114d63d2858cc9.tar.xz
facter-b39f8923e9772c2e8c99ca9351114d63d2858cc9.zip
Refactor #6044 -- require spec_helper with a consistent path.
Because we pull in spec_helper in individual tests, we need to use a consistent path or Ruby will evaluate it multiple times. Make the path consistent by expanding it before require.
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/facter.rb2
-rwxr-xr-x[-rw-r--r--]spec/unit/interfaces.rb2
-rwxr-xr-x[-rw-r--r--]spec/unit/operatingsystem.rb2
-rwxr-xr-xspec/unit/operatingsystemrelease.rb2
-rwxr-xr-x[-rw-r--r--]spec/unit/selinux.rb2
-rwxr-xr-xspec/unit/uptime.rb2
-rwxr-xr-xspec/unit/util/collection.rb2
-rwxr-xr-xspec/unit/util/confine.rb2
-rwxr-xr-xspec/unit/util/fact.rb2
-rwxr-xr-xspec/unit/util/ip.rb2
-rwxr-xr-xspec/unit/util/loader.rb2
-rwxr-xr-xspec/unit/util/macaddress.rb2
-rwxr-xr-xspec/unit/util/macosx.rb2
-rw-r--r--spec/unit/util/manufacturer.rb2
-rwxr-xr-xspec/unit/util/resolution.rb2
-rwxr-xr-xspec/unit/util/uptime.rb2
-rw-r--r--spec/unit/util/virtual.rb2
-rwxr-xr-x[-rw-r--r--]spec/unit/util/vlans.rb2
-rwxr-xr-xspec/unit/util/xendomains.rb2
-rw-r--r--spec/unit/virtual.rb2
20 files changed, 20 insertions, 20 deletions
diff --git a/spec/unit/facter.rb b/spec/unit/facter.rb
index 20f9ed1..e63bc76 100755
--- a/spec/unit/facter.rb
+++ b/spec/unit/facter.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 Facter do
diff --git a/spec/unit/interfaces.rb b/spec/unit/interfaces.rb
index 49d5d1f..8b295d6 100644..100755
--- a/spec/unit/interfaces.rb
+++ b/spec/unit/interfaces.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 'facter'
diff --git a/spec/unit/operatingsystem.rb b/spec/unit/operatingsystem.rb
index de86230..be83916 100644..100755
--- a/spec/unit/operatingsystem.rb
+++ b/spec/unit/operatingsystem.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 'facter'
diff --git a/spec/unit/operatingsystemrelease.rb b/spec/unit/operatingsystemrelease.rb
index 5c821c3..1cfb4ac 100755
--- a/spec/unit/operatingsystemrelease.rb
+++ b/spec/unit/operatingsystemrelease.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 'facter'
diff --git a/spec/unit/selinux.rb b/spec/unit/selinux.rb
index 8afa463..43fd5bf 100644..100755
--- a/spec/unit/selinux.rb
+++ b/spec/unit/selinux.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 'facter'
diff --git a/spec/unit/uptime.rb b/spec/unit/uptime.rb
index fc592e3..bd695fa 100755
--- a/spec/unit/uptime.rb
+++ b/spec/unit/uptime.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 'facter'
require 'facter/util/uptime'
diff --git a/spec/unit/util/collection.rb b/spec/unit/util/collection.rb
index 7baef96..86b602f 100755
--- a/spec/unit/util/collection.rb
+++ b/spec/unit/util/collection.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 'facter/util/collection'
diff --git a/spec/unit/util/confine.rb b/spec/unit/util/confine.rb
index 757ca26..147c70d 100755
--- a/spec/unit/util/confine.rb
+++ b/spec/unit/util/confine.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 'facter/util/confine'
require 'facter/util/values'
diff --git a/spec/unit/util/fact.rb b/spec/unit/util/fact.rb
index 1652032..db08670 100755
--- a/spec/unit/util/fact.rb
+++ b/spec/unit/util/fact.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 'facter/util/fact'
diff --git a/spec/unit/util/ip.rb b/spec/unit/util/ip.rb
index a9aae76..d87b4b9 100755
--- a/spec/unit/util/ip.rb
+++ b/spec/unit/util/ip.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 'facter/util/ip'
diff --git a/spec/unit/util/loader.rb b/spec/unit/util/loader.rb
index 0a28020..0bb823e 100755
--- a/spec/unit/util/loader.rb
+++ b/spec/unit/util/loader.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 'facter/util/loader'
diff --git a/spec/unit/util/macaddress.rb b/spec/unit/util/macaddress.rb
index 09794ec..98215c4 100755
--- a/spec/unit/util/macaddress.rb
+++ b/spec/unit/util/macaddress.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 'facter/util/macaddress'
diff --git a/spec/unit/util/macosx.rb b/spec/unit/util/macosx.rb
index 283fe75..44ba460 100755
--- a/spec/unit/util/macosx.rb
+++ b/spec/unit/util/macosx.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 'facter/util/macosx'
diff --git a/spec/unit/util/manufacturer.rb b/spec/unit/util/manufacturer.rb
index 291a6ff..07473db 100644
--- a/spec/unit/util/manufacturer.rb
+++ b/spec/unit/util/manufacturer.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'facter/util/manufacturer'
diff --git a/spec/unit/util/resolution.rb b/spec/unit/util/resolution.rb
index 396f800..581d0e1 100755
--- a/spec/unit/util/resolution.rb
+++ b/spec/unit/util/resolution.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 'facter/util/resolution'
diff --git a/spec/unit/util/uptime.rb b/spec/unit/util/uptime.rb
index c104856..8d3980c 100755
--- a/spec/unit/util/uptime.rb
+++ b/spec/unit/util/uptime.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 'facter/util/uptime'
diff --git a/spec/unit/util/virtual.rb b/spec/unit/util/virtual.rb
index 66dc98c..12ba0ac 100644
--- a/spec/unit/util/virtual.rb
+++ b/spec/unit/util/virtual.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'facter/util/virtual'
diff --git a/spec/unit/util/vlans.rb b/spec/unit/util/vlans.rb
index e06a2af..0331234 100644..100755
--- a/spec/unit/util/vlans.rb
+++ b/spec/unit/util/vlans.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 'facter/util/vlans'
diff --git a/spec/unit/util/xendomains.rb b/spec/unit/util/xendomains.rb
index bd9c5d5..dc7e178 100755
--- a/spec/unit/util/xendomains.rb
+++ b/spec/unit/util/xendomains.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 'facter/util/xendomains'
diff --git a/spec/unit/virtual.rb b/spec/unit/virtual.rb
index 9e8e358..a152b40 100644
--- a/spec/unit/virtual.rb
+++ b/spec/unit/virtual.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'facter'
require 'facter/util/virtual'