From 421b3fce66db7ff69052bd666d20e746952bc52b Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 28 Nov 2007 16:06:45 -0600 Subject: Another backward compatibility patch, this time helping with a new server and old client --- spec/unit/other/transobject.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'spec/unit') diff --git a/spec/unit/other/transobject.rb b/spec/unit/other/transobject.rb index 830d4923d..07ffdf8bd 100755 --- a/spec/unit/other/transobject.rb +++ b/spec/unit/other/transobject.rb @@ -9,6 +9,11 @@ describe Puppet::TransObject do resource = Puppet::TransObject.new("me", "foo::bar") resource.ref.should == 'Foo::Bar[me]' end + + it "should lower-case resource types for backward compatibility with 0.23.2" do + resource = Puppet::TransObject.new("me", "Foo") + resource.type.should == 'foo' + end end describe Puppet::TransObject, " when serializing" do @@ -63,7 +68,7 @@ describe Puppet::TransObject, " when converting to a RAL component instance" do end it "should use a new TransObject whose name is a resource reference of the type and title of the original TransObject" do - Puppet::Type::Component.expects(:create).with { |resource| resource.type == :component and resource.name == "One::Two[/my/file]" }.returns(:yay) + Puppet::Type::Component.expects(:create).with { |resource| resource.type == "component" and resource.name == "One::Two[/my/file]" }.returns(:yay) @resource.to_component.should == :yay end -- cgit