summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-04-01 00:08:15 -0500
committerLuke Kanies <luke@madstop.com>2008-04-01 00:08:15 -0500
commit5e78151d1736e2c4cb741c2cbb7c6b5a59ed3e13 (patch)
tree428a352bd3e8d4153e798ffdba390d02b5d63d68 /spec
parent88dc49cb7b0efe757c92ce28c807b91335acb07a (diff)
Fixing tests that were failing as a result of the merge,
including removing some now-obsolete code and tests from the Settings class.
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/node/catalog.rb5
-rwxr-xr-xspec/unit/other/transbucket.rb4
-rwxr-xr-xspec/unit/ral/type/noop_metaparam.rb2
-rwxr-xr-xspec/unit/util/settings.rb40
4 files changed, 2 insertions, 49 deletions
diff --git a/spec/unit/node/catalog.rb b/spec/unit/node/catalog.rb
index 434242103..d607b3540 100755
--- a/spec/unit/node/catalog.rb
+++ b/spec/unit/node/catalog.rb
@@ -514,10 +514,6 @@ describe Puppet::Node::Catalog, " when functioning as a resource container" do
raise "Aliased non-isomorphic resource"
end
end
-
- after do
- Puppet::Type.allclear
- end
end
describe Puppet::Node::Catalog do
@@ -647,6 +643,7 @@ describe Puppet::Node::Catalog, " when creating a relationship graph" do
@file = Puppet::Type.type(:file)
@one = @file.create :path => "/one"
@two = @file.create :path => "/two"
+ @sub = @file.create :path => "/two/subdir"
@catalog.add_edge @compone, @one
@catalog.add_edge @comptwo, @two
diff --git a/spec/unit/other/transbucket.rb b/spec/unit/other/transbucket.rb
index 4494f2abb..e447c78a2 100755
--- a/spec/unit/other/transbucket.rb
+++ b/spec/unit/other/transbucket.rb
@@ -91,10 +91,6 @@ describe Puppet::TransBucket, " when generating a catalog" do
@fakes = %w{Fake[bottom] Fake[middle] Fake[top]}
end
- after do
- Puppet::Type.allclear
- end
-
it "should convert all transportable objects to RAL resources" do
@catalog = @top.to_catalog
@users.each do |name|
diff --git a/spec/unit/ral/type/noop_metaparam.rb b/spec/unit/ral/type/noop_metaparam.rb
index 0cbed3714..236599ed5 100755
--- a/spec/unit/ral/type/noop_metaparam.rb
+++ b/spec/unit/ral/type/noop_metaparam.rb
@@ -9,8 +9,6 @@ describe Puppet::Type.type(:file).attrclass(:noop) do
@file = Puppet::Type.newfile :path => "/what/ever"
end
- after { Puppet::Type::File.clear }
-
it "should accept true as a value" do
lambda { @file[:noop] = true }.should_not raise_error
end
diff --git a/spec/unit/util/settings.rb b/spec/unit/util/settings.rb
index 9f7018697..441a3f4ef 100755
--- a/spec/unit/util/settings.rb
+++ b/spec/unit/util/settings.rb
@@ -476,7 +476,7 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d
def stub_transaction
@bucket = mock 'bucket'
- @config = mock 'config', :clear => nil
+ @config = mock 'config'
@trans = mock 'transaction'
@settings.expects(:to_transportable).with(:whatever).returns(@bucket)
@@ -592,14 +592,6 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d
file.should be_nil
end
- it "should not try to manage files in memory" do
- main = Puppet::Type.type(:file).create(:path => "/maindir")
-
- trans = @settings.to_transportable
-
- lambda { trans.to_catalog }.should_not raise_error
- end
-
it "should do nothing if a catalog cannot be created" do
bucket = mock 'bucket'
catalog = mock 'catalog'
@@ -611,34 +603,6 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d
@settings.use(:mysection)
end
- it "should clear the catalog after applying" do
- bucket = mock 'bucket'
- catalog = mock 'catalog'
-
- @settings.expects(:to_transportable).returns bucket
- bucket.expects(:to_catalog).returns catalog
- catalog.stubs(:host_config=)
- catalog.stubs(:apply)
- catalog.expects(:clear)
-
- @settings.use(:mysection)
- end
-
- it "should clear the catalog even if there is an exception during applying" do
- bucket = mock 'bucket'
- catalog = mock 'catalog'
-
- @settings.expects(:to_transportable).returns bucket
- bucket.expects(:to_catalog).returns catalog
- catalog.stubs(:host_config=)
- catalog.expects(:apply).raises(ArgumentError)
- catalog.expects(:clear)
-
- # We don't care about the raised exception, we just care that
- # we clear the catalog even with the exception
- lambda { @settings.use(:mysection) }.should raise_error
- end
-
it "should do nothing if all specified sections have already been used" do
bucket = mock 'bucket'
catalog = mock 'catalog'
@@ -696,6 +660,4 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d
proc { @settings.use(:whatever) }.should raise_error(RuntimeError)
end
-
- after { Puppet::Type.allclear }
end