summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-13 21:09:07 -0600
committerJames Turnbull <james@lovedthanlost.net>2009-02-14 22:42:51 +1100
commitcb0a083a4c7447d6da2f6a1ce6725cedeb831db1 (patch)
tree2b1260af28a695a6900ae643db553d2a296ff342 /spec/unit
parent84bd5285db5a80b01dd0359387516210ccb5b625 (diff)
downloadpuppet-cb0a083a4c7447d6da2f6a1ce6725cedeb831db1.tar.gz
puppet-cb0a083a4c7447d6da2f6a1ce6725cedeb831db1.tar.xz
puppet-cb0a083a4c7447d6da2f6a1ce6725cedeb831db1.zip
Using Puppet::Type.new instead of create
create() got deprecated and I apparently missed changing this. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/configurer/downloader.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/configurer/downloader.rb b/spec/unit/configurer/downloader.rb
index efd280d93..bc23574f2 100755
--- a/spec/unit/configurer/downloader.rb
+++ b/spec/unit/configurer/downloader.rb
@@ -35,54 +35,54 @@ describe Puppet::Configurer::Downloader do
end
it "should create a file instance with the right path and source" do
- Puppet::Type.type(:file).expects(:create).with { |opts| opts[:path] == "path" and opts[:source] == "source" }
+ Puppet::Type.type(:file).expects(:new).with { |opts| opts[:path] == "path" and opts[:source] == "source" }
@dler.file
end
it "should tag the file with the downloader name" do
- Puppet::Type.type(:file).expects(:create).with { |opts| opts[:tag] == "foo" }
+ Puppet::Type.type(:file).expects(:new).with { |opts| opts[:tag] == "foo" }
@dler.file
end
it "should always recurse" do
- Puppet::Type.type(:file).expects(:create).with { |opts| opts[:recurse] == true }
+ Puppet::Type.type(:file).expects(:new).with { |opts| opts[:recurse] == true }
@dler.file
end
it "should always purge" do
- Puppet::Type.type(:file).expects(:create).with { |opts| opts[:purge] == true }
+ Puppet::Type.type(:file).expects(:new).with { |opts| opts[:purge] == true }
@dler.file
end
it "should never be in noop" do
- Puppet::Type.type(:file).expects(:create).with { |opts| opts[:noop] == false }
+ Puppet::Type.type(:file).expects(:new).with { |opts| opts[:noop] == false }
@dler.file
end
it "should always set the owner to the current UID" do
Process.expects(:uid).returns 51
- Puppet::Type.type(:file).expects(:create).with { |opts| opts[:owner] == 51 }
+ Puppet::Type.type(:file).expects(:new).with { |opts| opts[:owner] == 51 }
@dler.file
end
it "should always set the group to the current GID" do
Process.expects(:gid).returns 61
- Puppet::Type.type(:file).expects(:create).with { |opts| opts[:group] == 61 }
+ Puppet::Type.type(:file).expects(:new).with { |opts| opts[:group] == 61 }
@dler.file
end
it "should always force the download" do
- Puppet::Type.type(:file).expects(:create).with { |opts| opts[:force] == true }
+ Puppet::Type.type(:file).expects(:new).with { |opts| opts[:force] == true }
@dler.file
end
it "should never back up when downloading" do
- Puppet::Type.type(:file).expects(:create).with { |opts| opts[:backup] == false }
+ Puppet::Type.type(:file).expects(:new).with { |opts| opts[:backup] == false }
@dler.file
end
it "should support providing an 'ignore' parameter" do
- Puppet::Type.type(:file).expects(:create).with { |opts| opts[:ignore] == ".svn" }
+ Puppet::Type.type(:file).expects(:new).with { |opts| opts[:ignore] == ".svn" }
@dler = Puppet::Configurer::Downloader.new("foo", "path", "source", ".svn")
@dler.file
end