diff options
Diffstat (limited to 'spec/unit/util/settings.rb')
| -rwxr-xr-x | spec/unit/util/settings.rb | 40 |
1 files changed, 1 insertions, 39 deletions
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 |
