summaryrefslogtreecommitdiffstats
path: root/spec/unit/other
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-12-17 18:29:58 -0600
committerLuke Kanies <luke@madstop.com>2008-12-18 11:10:25 -0600
commite4ba3db1963081eacc2aef3d865f777b427ef23c (patch)
tree55a4aa8cdde262880a8affb6cbd4470d49c10c55 /spec/unit/other
parentb6db54585177f277b1e06bebd4d925d5c272b610 (diff)
downloadpuppet-e4ba3db1963081eacc2aef3d865f777b427ef23c.tar.gz
puppet-e4ba3db1963081eacc2aef3d865f777b427ef23c.tar.xz
puppet-e4ba3db1963081eacc2aef3d865f777b427ef23c.zip
Deprecating the Puppet::Type.create.
This method is no longer necessary; you can use the normal 'new' class method. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/other')
-rw-r--r--spec/unit/other/selinux.rb6
-rwxr-xr-xspec/unit/other/transobject.rb8
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/other/selinux.rb b/spec/unit/other/selinux.rb
index 5e5568377..81ae9e9b9 100644
--- a/spec/unit/other/selinux.rb
+++ b/spec/unit/other/selinux.rb
@@ -7,7 +7,7 @@ require 'puppet/type/selmodule'
describe Puppet::Type.type(:file), " when manipulating file contexts" do
before :each do
- @file = Puppet::Type::File.create(
+ @file = Puppet::Type::File.new(
:name => "/tmp/foo",
:ensure => "file",
:seluser => "user_u",
@@ -30,7 +30,7 @@ describe Puppet::Type.type(:selboolean), " when manipulating booleans" do
provider_class = Puppet::Type::Selboolean.provider(Puppet::Type::Selboolean.providers[0])
Puppet::Type::Selboolean.expects(:defaultprovider).returns provider_class
- @bool = Puppet::Type::Selboolean.create(
+ @bool = Puppet::Type::Selboolean.new(
:name => "foo",
:value => "on",
:persistent => true )
@@ -59,7 +59,7 @@ describe Puppet::Type.type(:selmodule), " when checking policy modules" do
provider_class = Puppet::Type::Selmodule.provider(Puppet::Type::Selmodule.providers[0])
Puppet::Type::Selmodule.expects(:defaultprovider).returns provider_class
- @module = Puppet::Type::Selmodule.create(
+ @module = Puppet::Type::Selmodule.new(
:name => "foo",
:selmoduledir => "/some/path",
:selmodulepath => "/some/path/foo.pp",
diff --git a/spec/unit/other/transobject.rb b/spec/unit/other/transobject.rb
index 605517281..92ed2662f 100755
--- a/spec/unit/other/transobject.rb
+++ b/spec/unit/other/transobject.rb
@@ -88,25 +88,25 @@ describe Puppet::TransObject, " when converting to a RAL component instance" do
end
it "should use a new TransObject whose name is a resource reference of the type and title of the original TransObject" do
- Puppet::Type::Component.expects(:create).with { |resource| resource.type == "component" and resource.name == "One::Two[/my/file]" }.returns(:yay)
+ Puppet::Type::Component.expects(:new).with { |resource| resource.type == "component" and resource.name == "One::Two[/my/file]" }.returns(:yay)
@resource.to_component.should == :yay
end
it "should pass the resource parameters on to the newly created TransObject" do
- Puppet::Type::Component.expects(:create).with { |resource| resource["noop"] == "other" }.returns(:yay)
+ Puppet::Type::Component.expects(:new).with { |resource| resource["noop"] == "other" }.returns(:yay)
@resource.to_component.should == :yay
end
it "should copy over the catalog" do
@resource.catalog = "mycat"
- Puppet::Type::Component.expects(:create).with { |resource| resource.catalog == "mycat" }.returns(:yay)
+ Puppet::Type::Component.expects(:new).with { |resource| resource.catalog == "mycat" }.returns(:yay)
@resource.to_component
end
# LAK:FIXME This really isn't the design we want going forward, but it's
# good enough for now.
it "should not pass resource parameters that are not metaparams" do
- Puppet::Type::Component.expects(:create).with { |resource| resource["one"].nil? }.returns(:yay)
+ Puppet::Type::Component.expects(:new).with { |resource| resource["one"].nil? }.returns(:yay)
@resource.to_component.should == :yay
end
end