summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-12-09 15:33:28 -0600
committerLuke Kanies <luke@madstop.com>2008-12-18 11:10:21 -0600
commitd48fff6658535ca1781443aba9ab21893c13e55c (patch)
tree4fcfd8b502a0f23f057a6e0695f466195978f366 /spec/unit
parentc927ce05bbd96fa9aacc8e52f8eb797403a1e433 (diff)
downloadpuppet-d48fff6658535ca1781443aba9ab21893c13e55c.tar.gz
puppet-d48fff6658535ca1781443aba9ab21893c13e55c.tar.xz
puppet-d48fff6658535ca1781443aba9ab21893c13e55c.zip
Renaming Puppet::Node::Catalog to Puppet::Resource::Catalog
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/indirector/catalog/compiler.rb24
-rwxr-xr-xspec/unit/indirector/catalog/yaml.rb12
-rwxr-xr-xspec/unit/other/transaction.rb2
-rwxr-xr-xspec/unit/other/transbucket.rb4
-rwxr-xr-xspec/unit/parser/compiler.rb2
-rwxr-xr-xspec/unit/resource/catalog.rb (renamed from spec/unit/node/catalog.rb)82
-rwxr-xr-xspec/unit/transaction.rb2
-rwxr-xr-xspec/unit/type.rb4
-rwxr-xr-xspec/unit/type/file.rb4
-rwxr-xr-xspec/unit/type/mount.rb2
-rwxr-xr-xspec/unit/type/package.rb2
-rwxr-xr-xspec/unit/type/ssh_authorized_key.rb2
-rwxr-xr-xspec/unit/type/user.rb2
-rwxr-xr-xspec/unit/type/zfs.rb2
14 files changed, 73 insertions, 73 deletions
diff --git a/spec/unit/indirector/catalog/compiler.rb b/spec/unit/indirector/catalog/compiler.rb
index 8cd3c72f4..29b76d8e5 100755
--- a/spec/unit/indirector/catalog/compiler.rb
+++ b/spec/unit/indirector/catalog/compiler.rb
@@ -7,7 +7,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
require 'puppet/indirector/catalog/compiler'
-describe Puppet::Node::Catalog::Compiler do
+describe Puppet::Resource::Catalog::Compiler do
before do
Puppet.expects(:version).returns(1)
Facter.expects(:value).with('fqdn').returns("my.server.com")
@@ -15,11 +15,11 @@ describe Puppet::Node::Catalog::Compiler do
end
it "should gather data about itself" do
- Puppet::Node::Catalog::Compiler.new
+ Puppet::Resource::Catalog::Compiler.new
end
it "should cache the server metadata and reuse it" do
- compiler = Puppet::Node::Catalog::Compiler.new
+ compiler = Puppet::Resource::Catalog::Compiler.new
node1 = stub 'node1', :merge => nil
node2 = stub 'node2', :merge => nil
compiler.stubs(:compile)
@@ -31,16 +31,16 @@ describe Puppet::Node::Catalog::Compiler do
end
it "should provide a method for determining if the catalog is networked" do
- compiler = Puppet::Node::Catalog::Compiler.new
+ compiler = Puppet::Resource::Catalog::Compiler.new
compiler.should respond_to(:networked?)
end
end
-describe Puppet::Node::Catalog::Compiler, " when creating the interpreter" do
+describe Puppet::Resource::Catalog::Compiler, " when creating the interpreter" do
before do
# This gets pretty annoying on a plane where we have no IP address
Facter.stubs(:value).returns("whatever")
- @compiler = Puppet::Node::Catalog::Compiler.new
+ @compiler = Puppet::Resource::Catalog::Compiler.new
end
it "should not create the interpreter until it is asked for the first time" do
@@ -57,10 +57,10 @@ describe Puppet::Node::Catalog::Compiler, " when creating the interpreter" do
end
end
-describe Puppet::Node::Catalog::Compiler, " when finding nodes" do
+describe Puppet::Resource::Catalog::Compiler, " when finding nodes" do
before do
Facter.stubs(:value).returns("whatever")
- @compiler = Puppet::Node::Catalog::Compiler.new
+ @compiler = Puppet::Resource::Catalog::Compiler.new
@name = "me"
@node = mock 'node'
@request = stub 'request', :key => @name, :options => {}
@@ -74,12 +74,12 @@ describe Puppet::Node::Catalog::Compiler, " when finding nodes" do
end
end
-describe Puppet::Node::Catalog::Compiler, " after finding nodes" do
+describe Puppet::Resource::Catalog::Compiler, " after finding nodes" do
before do
Puppet.expects(:version).returns(1)
Facter.expects(:value).with('fqdn').returns("my.server.com")
Facter.expects(:value).with('ipaddress').returns("my.ip.address")
- @compiler = Puppet::Node::Catalog::Compiler.new
+ @compiler = Puppet::Resource::Catalog::Compiler.new
@name = "me"
@node = mock 'node'
@request = stub 'request', :key => @name, :options => {}
@@ -103,13 +103,13 @@ describe Puppet::Node::Catalog::Compiler, " after finding nodes" do
end
end
-describe Puppet::Node::Catalog::Compiler, " when creating catalogs" do
+describe Puppet::Resource::Catalog::Compiler, " when creating catalogs" do
before do
Facter.stubs(:value).returns("whatever")
env = stub 'environment', :name => "yay"
Puppet::Node::Environment.stubs(:new).returns(env)
- @compiler = Puppet::Node::Catalog::Compiler.new
+ @compiler = Puppet::Resource::Catalog::Compiler.new
@name = "me"
@node = Puppet::Node.new @name
@node.stubs(:merge)
diff --git a/spec/unit/indirector/catalog/yaml.rb b/spec/unit/indirector/catalog/yaml.rb
index 717fb816c..5f233c91c 100755
--- a/spec/unit/indirector/catalog/yaml.rb
+++ b/spec/unit/indirector/catalog/yaml.rb
@@ -2,24 +2,24 @@
require File.dirname(__FILE__) + '/../../../spec_helper'
-require 'puppet/node/catalog'
+require 'puppet/resource/catalog'
require 'puppet/indirector/catalog/yaml'
-describe Puppet::Node::Catalog::Yaml do
+describe Puppet::Resource::Catalog::Yaml do
it "should be a subclass of the Yaml terminus" do
- Puppet::Node::Catalog::Yaml.superclass.should equal(Puppet::Indirector::Yaml)
+ Puppet::Resource::Catalog::Yaml.superclass.should equal(Puppet::Indirector::Yaml)
end
it "should have documentation" do
- Puppet::Node::Catalog::Yaml.doc.should_not be_nil
+ Puppet::Resource::Catalog::Yaml.doc.should_not be_nil
end
it "should be registered with the catalog store indirection" do
indirection = Puppet::Indirector::Indirection.instance(:catalog)
- Puppet::Node::Catalog::Yaml.indirection.should equal(indirection)
+ Puppet::Resource::Catalog::Yaml.indirection.should equal(indirection)
end
it "should have its name set to :yaml" do
- Puppet::Node::Catalog::Yaml.name.should == :yaml
+ Puppet::Resource::Catalog::Yaml.name.should == :yaml
end
end
diff --git a/spec/unit/other/transaction.rb b/spec/unit/other/transaction.rb
index 0db470d26..d2ac26869 100755
--- a/spec/unit/other/transaction.rb
+++ b/spec/unit/other/transaction.rb
@@ -6,7 +6,7 @@ require 'puppet/transaction'
describe Puppet::Transaction, " when determining tags" do
before do
- @config = Puppet::Node::Catalog.new
+ @config = Puppet::Resource::Catalog.new
@transaction = Puppet::Transaction.new(@config)
end
diff --git a/spec/unit/other/transbucket.rb b/spec/unit/other/transbucket.rb
index e447c78a2..60efcdb87 100755
--- a/spec/unit/other/transbucket.rb
+++ b/spec/unit/other/transbucket.rb
@@ -130,14 +130,14 @@ describe Puppet::TransBucket, " when generating a catalog" do
end
it "should set each TransObject's catalog before converting to a RAL resource" do
- @middleobj.expects(:catalog=).with { |c| c.is_a?(Puppet::Node::Catalog) }
+ @middleobj.expects(:catalog=).with { |c| c.is_a?(Puppet::Resource::Catalog) }
@top.to_catalog
end
it "should set each TransBucket's catalog before converting to a RAL resource" do
# each bucket is seen twice in the loop, so we have to handle the case where the config
# is set twice
- @bottom.expects(:catalog=).with { |c| c.is_a?(Puppet::Node::Catalog) }.at_least_once
+ @bottom.expects(:catalog=).with { |c| c.is_a?(Puppet::Resource::Catalog) }.at_least_once
@top.to_catalog
end
end
diff --git a/spec/unit/parser/compiler.rb b/spec/unit/parser/compiler.rb
index bf50d8790..025836229 100755
--- a/spec/unit/parser/compiler.rb
+++ b/spec/unit/parser/compiler.rb
@@ -251,7 +251,7 @@ describe Puppet::Parser::Compiler do
file2 = Puppet::Type.type(:file).create :path => "/foo"
@compiler.add_resource(@scope, file1)
- lambda { @compiler.add_resource(@scope, file2) }.should raise_error(Puppet::Node::Catalog::DuplicateResourceError)
+ lambda { @compiler.add_resource(@scope, file2) }.should raise_error(Puppet::Resource::Catalog::DuplicateResourceError)
end
it "should have a method for looking up resources" do
diff --git a/spec/unit/node/catalog.rb b/spec/unit/resource/catalog.rb
index 97674dfc2..27e6296c6 100755
--- a/spec/unit/node/catalog.rb
+++ b/spec/unit/resource/catalog.rb
@@ -2,34 +2,34 @@
require File.dirname(__FILE__) + '/../../spec_helper'
-describe Puppet::Node::Catalog, " when compiling" do
+describe Puppet::Resource::Catalog, " when compiling" do
it "should accept tags" do
- config = Puppet::Node::Catalog.new("mynode")
+ config = Puppet::Resource::Catalog.new("mynode")
config.tag("one")
config.tags.should == %w{one}
end
it "should accept multiple tags at once" do
- config = Puppet::Node::Catalog.new("mynode")
+ config = Puppet::Resource::Catalog.new("mynode")
config.tag("one", "two")
config.tags.should == %w{one two}
end
it "should convert all tags to strings" do
- config = Puppet::Node::Catalog.new("mynode")
+ config = Puppet::Resource::Catalog.new("mynode")
config.tag("one", :two)
config.tags.should == %w{one two}
end
it "should tag with both the qualified name and the split name" do
- config = Puppet::Node::Catalog.new("mynode")
+ config = Puppet::Resource::Catalog.new("mynode")
config.tag("one::two")
config.tags.include?("one").should be_true
config.tags.include?("one::two").should be_true
end
it "should accept classes" do
- config = Puppet::Node::Catalog.new("mynode")
+ config = Puppet::Resource::Catalog.new("mynode")
config.add_class("one")
config.classes.should == %w{one}
config.add_class("two", "three")
@@ -37,22 +37,22 @@ describe Puppet::Node::Catalog, " when compiling" do
end
it "should tag itself with passed class names" do
- config = Puppet::Node::Catalog.new("mynode")
+ config = Puppet::Resource::Catalog.new("mynode")
config.add_class("one")
config.tags.should == %w{one}
end
end
-describe Puppet::Node::Catalog, " when extracting" do
+describe Puppet::Resource::Catalog, " when extracting" do
it "should return extraction result as the method result" do
- config = Puppet::Node::Catalog.new("mynode")
+ config = Puppet::Resource::Catalog.new("mynode")
config.expects(:extraction_format).returns(:whatever)
config.expects(:extract_to_whatever).returns(:result)
config.extract.should == :result
end
end
-describe Puppet::Node::Catalog, " when extracting transobjects" do
+describe Puppet::Resource::Catalog, " when extracting transobjects" do
def mkscope
@parser = Puppet::Parser::Parser.new :Code => ""
@@ -69,7 +69,7 @@ describe Puppet::Node::Catalog, " when extracting transobjects" do
end
it "should always create a TransBucket for the 'main' class" do
- config = Puppet::Node::Catalog.new("mynode")
+ config = Puppet::Resource::Catalog.new("mynode")
@scope = mkscope
@source = mock 'source'
@@ -87,7 +87,7 @@ describe Puppet::Node::Catalog, " when extracting transobjects" do
# This isn't really a spec-style test, but I don't know how better to do it.
it "should transform the resource graph into a tree of TransBuckets and TransObjects" do
- config = Puppet::Node::Catalog.new("mynode")
+ config = Puppet::Resource::Catalog.new("mynode")
@scope = mkscope
@source = mock 'source'
@@ -108,7 +108,7 @@ describe Puppet::Node::Catalog, " when extracting transobjects" do
# Now try it with a more complicated graph -- a three tier graph, each tier
it "should transform arbitrarily deep graphs into isomorphic trees" do
- config = Puppet::Node::Catalog.new("mynode")
+ config = Puppet::Resource::Catalog.new("mynode")
@scope = mkscope
@scope.stubs(:tags).returns([])
@@ -151,7 +151,7 @@ describe Puppet::Node::Catalog, " when extracting transobjects" do
end
end
-describe Puppet::Node::Catalog, " when converting to a transobject catalog" do
+describe Puppet::Resource::Catalog, " when converting to a transobject catalog" do
class CatalogTestResource
attr_accessor :name, :virtual, :builtin
def initialize(name, options = {})
@@ -181,7 +181,7 @@ describe Puppet::Node::Catalog, " when converting to a transobject catalog" do
end
before do
- @original = Puppet::Node::Catalog.new("mynode")
+ @original = Puppet::Resource::Catalog.new("mynode")
@original.tag(*%w{one two three})
@original.add_class *%w{four five six}
@@ -244,9 +244,9 @@ describe Puppet::Node::Catalog, " when converting to a transobject catalog" do
end
end
-describe Puppet::Node::Catalog, " when converting to a RAL catalog" do
+describe Puppet::Resource::Catalog, " when converting to a RAL catalog" do
before do
- @original = Puppet::Node::Catalog.new("mynode")
+ @original = Puppet::Resource::Catalog.new("mynode")
@original.tag(*%w{one two three})
@original.add_class *%w{four five six}
@@ -293,12 +293,12 @@ describe Puppet::Node::Catalog, " when converting to a RAL catalog" do
end
it "should convert parser resources to transobjects and set the catalog" do
- catalog = Puppet::Node::Catalog.new("mynode")
+ catalog = Puppet::Resource::Catalog.new("mynode")
result = mock 'catalog'
result.stub_everything
- Puppet::Node::Catalog.expects(:new).returns result
+ Puppet::Resource::Catalog.expects(:new).returns result
trans = mock 'trans'
resource = Puppet::Parser::Resource.new(:scope => mock("scope"), :source => mock("source"), :type => :file, :title => "/eh")
@@ -316,7 +316,7 @@ describe Puppet::Node::Catalog, " when converting to a RAL catalog" do
it "should not lose track of resources whose names vary" do
changer = Puppet::TransObject.new 'changer', 'test'
- config = Puppet::Node::Catalog.new('test')
+ config = Puppet::Resource::Catalog.new('test')
config.add_resource(changer)
config.add_resource(@top)
@@ -340,9 +340,9 @@ describe Puppet::Node::Catalog, " when converting to a RAL catalog" do
end
end
-describe Puppet::Node::Catalog, " when functioning as a resource container" do
+describe Puppet::Resource::Catalog, " when functioning as a resource container" do
before do
- @catalog = Puppet::Node::Catalog.new("host")
+ @catalog = Puppet::Resource::Catalog.new("host")
@one = Puppet::Type.type(:notify).create :name => "one"
@two = Puppet::Type.type(:notify).create :name => "two"
@dupe = Puppet::Type.type(:notify).create :name => "one"
@@ -392,7 +392,7 @@ describe Puppet::Node::Catalog, " when functioning as a resource container" do
it "should not allow two resources with the same resource reference" do
@catalog.add_resource(@one)
- proc { @catalog.add_resource(@dupe) }.should raise_error(Puppet::Node::Catalog::DuplicateResourceError)
+ proc { @catalog.add_resource(@dupe) }.should raise_error(Puppet::Resource::Catalog::DuplicateResourceError)
end
it "should ignore implicit resources that conflict with existing resources" do
@@ -473,7 +473,7 @@ describe Puppet::Node::Catalog, " when functioning as a resource container" do
it "should optionally support an initialization block and should finalize after such blocks" do
@one.expects :finish
@two.expects :finish
- config = Puppet::Node::Catalog.new("host") do |conf|
+ config = Puppet::Resource::Catalog.new("host") do |conf|
conf.add_resource @one
conf.add_resource @two
end
@@ -599,9 +599,9 @@ describe Puppet::Node::Catalog, " when functioning as a resource container" do
end
end
-describe Puppet::Node::Catalog do
+describe Puppet::Resource::Catalog do
before :each do
- @catalog = Puppet::Node::Catalog.new("host")
+ @catalog = Puppet::Resource::Catalog.new("host")
@catalog.retrieval_duration = Time.now
@transaction = mock 'transaction'
@@ -612,7 +612,7 @@ describe Puppet::Node::Catalog do
end
it "should be an Expirer" do
- Puppet::Node::Catalog.ancestors.should be_include(Puppet::Util::Cacher::Expirer)
+ Puppet::Resource::Catalog.ancestors.should be_include(Puppet::Util::Cacher::Expirer)
end
it "should always be expired if it's not applying" do
@@ -745,7 +745,7 @@ describe Puppet::Node::Catalog do
after { Puppet.settings.clear }
end
- describe Puppet::Node::Catalog, " when applying non-host catalogs" do
+ describe Puppet::Resource::Catalog, " when applying non-host catalogs" do
before do
@catalog.host_config = false
@@ -768,10 +768,10 @@ describe Puppet::Node::Catalog do
end
end
-describe Puppet::Node::Catalog, " when creating a relationship graph" do
+describe Puppet::Resource::Catalog, " when creating a relationship graph" do
before do
Puppet::Type.type(:component)
- @catalog = Puppet::Node::Catalog.new("host")
+ @catalog = Puppet::Resource::Catalog.new("host")
@compone = Puppet::Type::Component.create :name => "one"
@comptwo = Puppet::Type::Component.create :name => "two", :require => ["class", "one"]
@file = Puppet::Type.type(:file)
@@ -856,9 +856,9 @@ describe Puppet::Node::Catalog, " when creating a relationship graph" do
end
end
-describe Puppet::Node::Catalog, " when writing dot files" do
+describe Puppet::Resource::Catalog, " when writing dot files" do
before do
- @catalog = Puppet::Node::Catalog.new("host")
+ @catalog = Puppet::Resource::Catalog.new("host")
@name = :test
@file = File.join(Puppet[:graphdir], @name.to_s + ".dot")
end
@@ -875,7 +875,7 @@ describe Puppet::Node::Catalog, " when writing dot files" do
end
end
-describe Puppet::Node::Catalog, " when indirecting" do
+describe Puppet::Resource::Catalog, " when indirecting" do
before do
@indirection = stub 'indirection', :name => :catalog
@@ -883,13 +883,13 @@ describe Puppet::Node::Catalog, " when indirecting" do
end
it "should redirect to the indirection for retrieval" do
- Puppet::Node::Catalog.stubs(:indirection).returns(@indirection)
+ Puppet::Resource::Catalog.stubs(:indirection).returns(@indirection)
@indirection.expects(:find)
- Puppet::Node::Catalog.find(:myconfig)
+ Puppet::Resource::Catalog.find(:myconfig)
end
it "should default to the 'compiler' terminus" do
- Puppet::Node::Catalog.indirection.terminus_class.should == :compiler
+ Puppet::Resource::Catalog.indirection.terminus_class.should == :compiler
end
after do
@@ -897,9 +897,9 @@ describe Puppet::Node::Catalog, " when indirecting" do
end
end
-describe Puppet::Node::Catalog, " when converting to yaml" do
+describe Puppet::Resource::Catalog, " when converting to yaml" do
before do
- @catalog = Puppet::Node::Catalog.new("me")
+ @catalog = Puppet::Resource::Catalog.new("me")
@catalog.add_edge("one", "two")
end
@@ -908,9 +908,9 @@ describe Puppet::Node::Catalog, " when converting to yaml" do
end
end
-describe Puppet::Node::Catalog, " when converting from yaml" do
+describe Puppet::Resource::Catalog, " when converting from yaml" do
before do
- @catalog = Puppet::Node::Catalog.new("me")
+ @catalog = Puppet::Resource::Catalog.new("me")
@catalog.add_edge("one", "two")
text = YAML.dump(@catalog)
@@ -918,7 +918,7 @@ describe Puppet::Node::Catalog, " when converting from yaml" do
end
it "should get converted back to a catalog" do
- @newcatalog.should be_instance_of(Puppet::Node::Catalog)
+ @newcatalog.should be_instance_of(Puppet::Resource::Catalog)
end
it "should have all vertices" do
diff --git a/spec/unit/transaction.rb b/spec/unit/transaction.rb
index 2c1998587..0758e6c1e 100755
--- a/spec/unit/transaction.rb
+++ b/spec/unit/transaction.rb
@@ -9,7 +9,7 @@ describe Puppet::Transaction do
@generator_class = mkgenerator
@generator = mkgenerator.create(:name => "foo")
- @catalog = Puppet::Node::Catalog.new
+ @catalog = Puppet::Resource::Catalog.new
@catalog.add_resource @generator
@report = stub_everything 'report'
diff --git a/spec/unit/type.rb b/spec/unit/type.rb
index 89a8e5e9c..a279e1139 100755
--- a/spec/unit/type.rb
+++ b/spec/unit/type.rb
@@ -8,7 +8,7 @@ describe Puppet::Type do
end
it "should use its catalog as its expirer" do
- catalog = Puppet::Node::Catalog.new
+ catalog = Puppet::Resource::Catalog.new
resource = Puppet::Type.type(:mount).create(:name => "foo", :fstype => "bar", :pass => 1, :ensure => :present)
resource.catalog = catalog
resource.expirer.should equal(catalog)
@@ -67,7 +67,7 @@ describe Puppet::Type do
describe "when in a catalog" do
before do
- @catalog = Puppet::Node::Catalog.new
+ @catalog = Puppet::Resource::Catalog.new
@container = Puppet::Type.type(:component).create(:name => "container")
@one = Puppet::Type.type(:file).create(:path => "/file/one")
@two = Puppet::Type.type(:file).create(:path => "/file/two")
diff --git a/spec/unit/type/file.rb b/spec/unit/type/file.rb
index 0ab4f40bb..399181e6c 100755
--- a/spec/unit/type/file.rb
+++ b/spec/unit/type/file.rb
@@ -105,7 +105,7 @@ describe Puppet::Type.type(:file) do
:path => @link,
:mode => "755"
)
- @catalog = Puppet::Node::Catalog.new
+ @catalog = Puppet::Resource::Catalog.new
@catalog.add_resource @resource
end
@@ -186,7 +186,7 @@ describe Puppet::Type.type(:file) do
stat = mock 'stat'
File.expects(:lstat).returns stat
- catalog = Puppet::Node::Catalog.new
+ catalog = Puppet::Resource::Catalog.new
@resource.catalog = catalog
catalog.stubs(:applying?).returns true
diff --git a/spec/unit/type/mount.rb b/spec/unit/type/mount.rb
index 7ddb7ea26..72028f312 100755
--- a/spec/unit/type/mount.rb
+++ b/spec/unit/type/mount.rb
@@ -196,7 +196,7 @@ describe Puppet::Type.type(:mount), "when modifying an existing mount entry" do
@mount.provider.stubs(:mounted?).returns true
- @catalog = Puppet::Node::Catalog.new
+ @catalog = Puppet::Resource::Catalog.new
@catalog.add_resource @mount
end
diff --git a/spec/unit/type/package.rb b/spec/unit/type/package.rb
index 13bf4d3d3..10d74d0b6 100755
--- a/spec/unit/type/package.rb
+++ b/spec/unit/type/package.rb
@@ -108,7 +108,7 @@ describe Puppet::Type.type(:package) do
Puppet::Type.type(:package).defaultprovider.stubs(:instances).returns([])
@package = Puppet::Type.type(:package).create(:name => "yay")
- @catalog = Puppet::Node::Catalog.new
+ @catalog = Puppet::Resource::Catalog.new
@catalog.add_resource(@package)
end
diff --git a/spec/unit/type/ssh_authorized_key.rb b/spec/unit/type/ssh_authorized_key.rb
index 3240b7a94..0e32ef77a 100755
--- a/spec/unit/type/ssh_authorized_key.rb
+++ b/spec/unit/type/ssh_authorized_key.rb
@@ -14,7 +14,7 @@ describe ssh_authorized_key do
@provider = stub 'provider', :class => @provider_class, :file_path => "/tmp/whatever", :clear => nil
@provider_class.stubs(:new).returns(@provider)
- @catalog = Puppet::Node::Catalog.new
+ @catalog = Puppet::Resource::Catalog.new
end
it "should have a name parameter" do
diff --git a/spec/unit/type/user.rb b/spec/unit/type/user.rb
index 78bfa2e82..51b38186a 100755
--- a/spec/unit/type/user.rb
+++ b/spec/unit/type/user.rb
@@ -246,7 +246,7 @@ describe user do
testrole = Puppet.type(:user).create(:name => "testrole")
- config = Puppet::Node::Catalog.new :testing do |conf|
+ config = Puppet::Resource::Catalog.new :testing do |conf|
[testuser, testrole].each { |resource| conf.add_resource resource }
end
diff --git a/spec/unit/type/zfs.rb b/spec/unit/type/zfs.rb
index 08d6e0747..f36c715d2 100755
--- a/spec/unit/type/zfs.rb
+++ b/spec/unit/type/zfs.rb
@@ -34,7 +34,7 @@ describe zfs do
foo_bar_baz_zfs = Puppet.type(:zfs).create(:name => "foo/bar/baz")
foo_bar_baz_buz_zfs = Puppet.type(:zfs).create(:name => "foo/bar/baz/buz")
- config = Puppet::Node::Catalog.new :testing do |conf|
+ config = Puppet::Resource::Catalog.new :testing do |conf|
[foo_pool, foo_bar_zfs, foo_bar_baz_zfs, foo_bar_baz_buz_zfs].each { |resource| conf.add_resource resource }
end