diff options
| author | Luke Kanies <luke@madstop.com> | 2007-12-11 15:35:36 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-12-11 15:35:36 -0600 |
| commit | cb0c4eebb0a7b2fadc5e0487e1c692007cb8b2e5 (patch) | |
| tree | b4284addea69adf9d19028ff1bab94035b1c1827 /spec/unit/ral | |
| parent | 7ac3bd79621f6c66cd3b5b7041aeba83c27c3602 (diff) | |
| download | puppet-cb0c4eebb0a7b2fadc5e0487e1c692007cb8b2e5.tar.gz puppet-cb0c4eebb0a7b2fadc5e0487e1c692007cb8b2e5.tar.xz puppet-cb0c4eebb0a7b2fadc5e0487e1c692007cb8b2e5.zip | |
Renaming 'configuration' to 'catalog', fixing #954.
Diffstat (limited to 'spec/unit/ral')
| -rwxr-xr-x | spec/unit/ral/type.rb | 14 | ||||
| -rwxr-xr-x | spec/unit/ral/types/package.rb | 32 |
2 files changed, 23 insertions, 23 deletions
diff --git a/spec/unit/ral/type.rb b/spec/unit/ral/type.rb index 60b99eeb8..25f8cbaf1 100755 --- a/spec/unit/ral/type.rb +++ b/spec/unit/ral/type.rb @@ -4,15 +4,15 @@ require File.dirname(__FILE__) + '/../../spec_helper' describe Puppet::Type, " when in a configuration" do before do - @configuration = Puppet::Node::Configuration.new + @catalog = Puppet::Node::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") - @configuration.add_resource @container - @configuration.add_resource @one - @configuration.add_resource @two - @configuration.add_edge! @container, @one - @configuration.add_edge! @container, @two + @catalog.add_resource @container + @catalog.add_resource @one + @catalog.add_resource @two + @catalog.add_edge! @container, @one + @catalog.add_edge! @container, @two end it "should have no parent if there is no in edge" do @@ -24,6 +24,6 @@ describe Puppet::Type, " when in a configuration" do end after do - @configuration.clear(true) + @catalog.clear(true) end end diff --git a/spec/unit/ral/types/package.rb b/spec/unit/ral/types/package.rb index fd200c56f..f14a792b9 100755 --- a/spec/unit/ral/types/package.rb +++ b/spec/unit/ral/types/package.rb @@ -107,8 +107,8 @@ module PackageEvaluationTesting Puppet::Type::Package.defaultprovider.stubs(:new).returns(@provider) @package = Puppet::Type::Package.create(:name => "yay") - @configuration = Puppet::Node::Configuration.new - @configuration.add_resource(@package) + @catalog = Puppet::Node::Catalog.new + @catalog.add_resource(@package) end def setprops(properties) @@ -116,7 +116,7 @@ module PackageEvaluationTesting end def teardown - @configuration.clear(true) + @catalog.clear(true) Puppet::Type::Package.clear end end @@ -128,14 +128,14 @@ describe Puppet::Type::Package, "when it should be purged" do it "should do nothing if it is :purged" do @provider.expects(:properties).returns(:ensure => :purged) - @configuration.apply + @catalog.apply end [:absent, :installed, :present, :latest].each do |state| it "should purge if it is #{state.to_s}" do @provider.stubs(:properties).returns(:ensure => state) @provider.expects(:purge) - @configuration.apply + @catalog.apply end end end @@ -148,7 +148,7 @@ describe Puppet::Type::Package, "when it should be absent" do [:purged, :absent].each do |state| it "should do nothing if it is #{state.to_s}" do @provider.expects(:properties).returns(:ensure => state) - @configuration.apply + @catalog.apply end end @@ -156,7 +156,7 @@ describe Puppet::Type::Package, "when it should be absent" do it "should uninstall if it is #{state.to_s}" do @provider.stubs(:properties).returns(:ensure => state) @provider.expects(:uninstall) - @configuration.apply + @catalog.apply end end end @@ -169,7 +169,7 @@ describe Puppet::Type::Package, "when it should be present" do [:present, :latest, "1.0"].each do |state| it "should do nothing if it is #{state.to_s}" do @provider.expects(:properties).returns(:ensure => state) - @configuration.apply + @catalog.apply end end @@ -177,7 +177,7 @@ describe Puppet::Type::Package, "when it should be present" do it "should install if it is #{state.to_s}" do @provider.stubs(:properties).returns(:ensure => state) @provider.expects(:install) - @configuration.apply + @catalog.apply end end end @@ -191,7 +191,7 @@ describe Puppet::Type::Package, "when it should be latest" do it "should upgrade if it is #{state.to_s}" do @provider.stubs(:properties).returns(:ensure => state) @provider.expects(:update) - @configuration.apply + @catalog.apply end end @@ -199,21 +199,21 @@ describe Puppet::Type::Package, "when it should be latest" do @provider.stubs(:properties).returns(:ensure => "1.0") @provider.stubs(:latest).returns("2.0") @provider.expects(:update) - @configuration.apply + @catalog.apply end it "should do nothing if it is equal to the latest version" do @provider.stubs(:properties).returns(:ensure => "1.0") @provider.stubs(:latest).returns("1.0") @provider.expects(:update).never - @configuration.apply + @catalog.apply end it "should do nothing if the provider returns :present as the latest version" do @provider.stubs(:properties).returns(:ensure => :present) @provider.stubs(:latest).returns("1.0") @provider.expects(:update).never - @configuration.apply + @catalog.apply end end @@ -226,19 +226,19 @@ describe Puppet::Type::Package, "when it should be a specific version" do it "should install if it is #{state.to_s}" do @provider.stubs(:properties).returns(:ensure => state) @provider.expects(:install) - @configuration.apply + @catalog.apply end end it "should do nothing if the current version is equal to the desired version" do @provider.stubs(:properties).returns(:ensure => "1.0") @provider.expects(:install).never - @configuration.apply + @catalog.apply end it "should install if the current version is not equal to the specified version" do @provider.stubs(:properties).returns(:ensure => "2.0") @provider.expects(:install) - @configuration.apply + @catalog.apply end end |
