diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-05-25 15:13:28 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | dc1a977512b854c967bfcb1d115d88c6f778e56e (patch) | |
| tree | bdf3221f64c9492fd571c376993d64b0dc7370ca /spec/unit/network | |
| parent | e0e6b642c4eefc1b5f44b44638d2db24f4845ef1 (diff) | |
| download | puppet-dc1a977512b854c967bfcb1d115d88c6f778e56e.tar.gz puppet-dc1a977512b854c967bfcb1d115d88c6f778e56e.tar.xz puppet-dc1a977512b854c967bfcb1d115d88c6f778e56e.zip | |
[#3766] Remove YAML fixups
Remove workarounds that were only needed because ruby's builtin YAML
lib is broken.
Diffstat (limited to 'spec/unit/network')
| -rwxr-xr-x | spec/unit/network/formats.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/spec/unit/network/formats.rb b/spec/unit/network/formats.rb index 78b35fd13..fd78ebf52 100755 --- a/spec/unit/network/formats.rb +++ b/spec/unit/network/formats.rb @@ -50,29 +50,12 @@ describe "Puppet Network Format" do @yaml.render(instance).should == "foo" end - it "should fixup generated yaml on render" do - instance = mock 'instance', :to_yaml => "foo" - - @yaml.expects(:fixup).with("foo").returns "bar" - - @yaml.render(instance).should == "bar" - end - it "should render multiple instances by calling 'to_yaml' on the array" do instances = [mock('instance')] instances.expects(:to_yaml).returns "foo" @yaml.render_multiple(instances).should == "foo" end - it "should fixup generated yaml on render" do - instances = [mock('instance')] - instances.stubs(:to_yaml).returns "foo" - - @yaml.expects(:fixup).with("foo").returns "bar" - - @yaml.render(instances).should == "bar" - end - it "should intern by calling 'YAML.load'" do text = "foo" YAML.expects(:load).with("foo").returns "bar" @@ -84,10 +67,6 @@ describe "Puppet Network Format" do YAML.expects(:load).with("foo").returns "bar" @yaml.intern_multiple(String, text).should == "bar" end - - it "should fixup incorrect yaml to correct" do - @yaml.fixup("&id004 !ruby/object:Puppet::Relationship ?").should == "? &id004 !ruby/object:Puppet::Relationship" - end end describe "base64 compressed yaml" do @@ -108,14 +87,6 @@ describe "Puppet Network Format" do @yaml.render(instance) end - it "should fixup generated yaml on render" do - instance = mock 'instance', :to_yaml => "foo" - - @yaml.expects(:fixup).with("foo").returns "bar" - - @yaml.render(instance) - end - it "should encode generated yaml on render" do instance = mock 'instance', :to_yaml => "foo" @@ -130,15 +101,6 @@ describe "Puppet Network Format" do @yaml.render_multiple(instances) end - it "should fixup generated yaml on render" do - instances = [mock('instance')] - instances.stubs(:to_yaml).returns "foo" - - @yaml.expects(:fixup).with("foo").returns "bar" - - @yaml.render(instances) - end - it "should encode generated yaml on render" do instances = [mock('instance')] instances.stubs(:to_yaml).returns "foo" @@ -173,10 +135,6 @@ describe "Puppet Network Format" do @yaml.encode("foo").should == "baz" end - it "should fixup incorrect yaml to correct" do - @yaml.fixup("&id004 !ruby/object:Puppet::Relationship ?").should == "? &id004 !ruby/object:Puppet::Relationship" - end - describe "when zlib is disabled" do before do Puppet[:zlib] = false |
