On 28 January 2011 18:44, Daniel Pittman <dan...@puppetlabs.com> wrote: > From: Daniel Pittman <dan...@rimspace.net> > > 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.
+1 > --- > spec/integration/facter.rb | 2 +- > spec/unit/facter.rb | 2 +- > spec/unit/interfaces.rb | 2 +- > spec/unit/operatingsystem.rb | 2 +- > spec/unit/operatingsystemrelease.rb | 2 +- > spec/unit/selinux.rb | 2 +- > spec/unit/uptime.rb | 2 +- > spec/unit/util/collection.rb | 2 +- > spec/unit/util/confine.rb | 2 +- > spec/unit/util/fact.rb | 2 +- > spec/unit/util/ip.rb | 2 +- > spec/unit/util/loader.rb | 2 +- > spec/unit/util/macaddress.rb | 2 +- > spec/unit/util/macosx.rb | 2 +- > spec/unit/util/manufacturer.rb | 2 +- > spec/unit/util/resolution.rb | 2 +- > spec/unit/util/uptime.rb | 2 +- > spec/unit/util/virtual.rb | 2 +- > spec/unit/util/vlans.rb | 2 +- > spec/unit/util/xendomains.rb | 2 +- > spec/unit/virtual.rb | 2 +- > 21 files changed, 21 insertions(+), 21 deletions(-) > mode change 100644 => 100755 spec/unit/interfaces.rb > mode change 100644 => 100755 spec/unit/operatingsystem.rb > mode change 100644 => 100755 spec/unit/selinux.rb > mode change 100644 => 100755 spec/unit/util/vlans.rb > > diff --git a/spec/integration/facter.rb b/spec/integration/facter.rb > index 79a1f0f..8351de1 100755 > --- a/spec/integration/facter.rb > +++ b/spec/integration/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 > before do > 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 > old mode 100644 > new mode 100755 > index 49d5d1f..8b295d6 > --- 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 > old mode 100644 > new mode 100755 > index de86230..be83916 > --- 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 > old mode 100644 > new mode 100755 > index 8afa463..43fd5bf > --- 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 > old mode 100644 > new mode 100755 > index e06a2af..0331234 > --- 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' > -- > 1.7.3.5 > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to puppet-dev@googlegroups.com. > To unsubscribe from this group, send email to > puppet-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.