summaryrefslogtreecommitdiffstats
path: root/spec/unit/ral
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-27 17:24:13 -0600
committerLuke Kanies <luke@madstop.com>2007-11-27 17:24:13 -0600
commit0ef6b9579df65adda51389a2ab3e514ef42afa14 (patch)
tree150340dc12e29d3b8397521e33e2baf60147d299 /spec/unit/ral
parenta38b4151244c0af4bdf058d3fec5a01dc271e1c3 (diff)
downloadpuppet-0ef6b9579df65adda51389a2ab3e514ef42afa14.tar.gz
puppet-0ef6b9579df65adda51389a2ab3e514ef42afa14.tar.xz
puppet-0ef6b9579df65adda51389a2ab3e514ef42afa14.zip
Fixing #931 by keeping track in configurations of
what transportable resources get converted to, so different names don't throw it off. I also got rid of the Puppet::Type#merge method, which has been deprecated for ages but was still in there. I had to fix a few tests that weren't cleaning up after themselves as a result.
Diffstat (limited to 'spec/unit/ral')
-rwxr-xr-xspec/unit/ral/type.rb4
-rwxr-xr-xspec/unit/ral/types/file.rb12
2 files changed, 10 insertions, 6 deletions
diff --git a/spec/unit/ral/type.rb b/spec/unit/ral/type.rb
index c8bf8c9b4..adb40595e 100755
--- a/spec/unit/ral/type.rb
+++ b/spec/unit/ral/type.rb
@@ -22,4 +22,8 @@ describe Puppet::Type, " when in a configuration" do
it "should set its parent to its in edge" do
@one.parent.ref.should equal(@container.ref)
end
+
+ after do
+ @configuration.clear(true)
+ end
end
diff --git a/spec/unit/ral/types/file.rb b/spec/unit/ral/types/file.rb
index 823d643b0..1e20b06f4 100755
--- a/spec/unit/ral/types/file.rb
+++ b/spec/unit/ral/types/file.rb
@@ -1,18 +1,15 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../../spec_helper'
-require 'tempfile'
-describe Puppet::type(:file), " when used with replace=>false and content" do
+require 'puppet/type/pfile'
+describe Puppet::Type::File, " when used with replace=>false and content" do
before do
@path = Tempfile.new("puppetspec")
@path.close!()
@path = @path.path
- @file = Puppet::type(:file).create( { :name => @path, :content => "foo", :replace => :false } )
- end
-
- after do
+ @file = Puppet::Type::File.create( { :name => @path, :content => "foo", :replace => :false } )
end
it "should be insync if the file exists and the content is different" do
@@ -29,4 +26,7 @@ describe Puppet::type(:file), " when used with replace=>false and content" do
@file.property(:content).insync?(:nil).should be_false
end
+ after do
+ Puppet::Type::File.clear
+ end
end