summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-05-20 10:42:46 -0700
committerJosh Cooper <josh@puppetlabs.com>2011-05-20 10:42:46 -0700
commit9c3bedd6b4d53584967e42a7fd07441252b56f6e (patch)
treec1ed661a99c3180fdb4d2e53eb4a740b02eb0041
parenteeeab02fd97a625ec0e21ecd5d0ed7f0067027ef (diff)
downloadpuppet-9c3bedd6b4d53584967e42a7fd07441252b56f6e.tar.gz
puppet-9c3bedd6b4d53584967e42a7fd07441252b56f6e.tar.xz
puppet-9c3bedd6b4d53584967e42a7fd07441252b56f6e.zip
(#7507) Add more 1.9 filters
Additionally we fixed a scoping issue with the File type. Paired-With: Matt Robinson <matt@puppetlabs.com>
-rw-r--r--lib/puppet/type/file.rb2
-rwxr-xr-xspec/unit/indirector/facts/couch_spec.rb4
-rwxr-xr-xspec/unit/parser/resource_spec.rb8
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb
index 1790c5e92..72e9a9495 100644
--- a/lib/puppet/type/file.rb
+++ b/lib/puppet/type/file.rb
@@ -264,7 +264,7 @@ Puppet::Type.newtype(:file) do
parents = []
until basedir == parents.last
parents << basedir
- basedir = File.dirname(basedir)
+ basedir = ::File.dirname(basedir)
end
# The filename of the first ancestor found, or nil
parents.find { |dir| catalog.resource(:file, dir) }
diff --git a/spec/unit/indirector/facts/couch_spec.rb b/spec/unit/indirector/facts/couch_spec.rb
index b6477bafe..7038a438d 100755
--- a/spec/unit/indirector/facts/couch_spec.rb
+++ b/spec/unit/indirector/facts/couch_spec.rb
@@ -4,9 +4,9 @@ require 'spec_helper'
require 'puppet/node/facts'
require 'puppet/indirector/facts/couch'
-describe "Puppet::Node::Facts::Couch" do
+describe "Puppet::Node::Facts::Couch", :'fails_on_ruby_1.9.2' => true do
describe "when couchdb is not available", :unless => Puppet.features.couchdb? do
- it "should fail to initialize", :'fails_in_ruby_1.9.2' => true do
+ it "should fail to initialize" do
lambda { Puppet::Node::Facts::Couch.new }.should raise_error
end
end
diff --git a/spec/unit/parser/resource_spec.rb b/spec/unit/parser/resource_spec.rb
index 365c4e9c5..1190716d7 100755
--- a/spec/unit/parser/resource_spec.rb
+++ b/spec/unit/parser/resource_spec.rb
@@ -163,7 +163,7 @@ describe Puppet::Parser::Resource do
res.evaluate
end
- it "should add an edge to any specified stage for class resources" do
+ it "should add an edge to any specified stage for class resources", :'fails_on_ruby_1.9.2' => true do
@compiler.known_resource_types.add Puppet::Resource::Type.new(:hostclass, "foo", '')
other_stage = Puppet::Parser::Resource.new(:stage, "other", :scope => @scope, :catalog => @catalog)
@@ -177,7 +177,7 @@ describe Puppet::Parser::Resource do
@compiler.catalog.edge?(other_stage, resource).should be_true
end
- it "should fail if an unknown stage is specified" do
+ it "should fail if an unknown stage is specified", :'fails_on_ruby_1.9.2' => true do
@compiler.known_resource_types.add Puppet::Resource::Type.new(:hostclass, "foo", '')
resource = Puppet::Parser::Resource.new(:class, "foo", :scope => @scope, :catalog => @catalog)
@@ -186,7 +186,7 @@ describe Puppet::Parser::Resource do
lambda { resource.evaluate }.should raise_error(ArgumentError, /Could not find stage other specified by/)
end
- it "should add edges from the class resources to the parent's stage if no stage is specified" do
+ it "should add edges from the class resources to the parent's stage if no stage is specified", :'fails_on_ruby_1.9.2' => true do
main = @compiler.catalog.resource(:stage, :main)
foo_stage = Puppet::Parser::Resource.new(:stage, :foo_stage, :scope => @scope, :catalog => @catalog)
@compiler.add_resource(@scope, foo_stage)
@@ -200,7 +200,7 @@ describe Puppet::Parser::Resource do
@compiler.catalog.should be_edge(foo_stage, resource)
end
- it "should add edges from top-level class resources to the main stage if no stage is specified" do
+ it "should add edges from top-level class resources to the main stage if no stage is specified", :'fails_on_ruby_1.9.2' => true do
main = @compiler.catalog.resource(:stage, :main)
@compiler.known_resource_types.add Puppet::Resource::Type.new(:hostclass, "foo", '')
resource = Puppet::Parser::Resource.new(:class, "foo", :scope => @scope, :catalog => @catalog)