diff options
author | Luke Kanies <luke@madstop.com> | 2007-11-28 15:56:24 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-11-28 15:56:24 -0600 |
commit | bbf8a8bfc6a817ea19c4dabe3ce89f09d42df68d (patch) | |
tree | 82ed142f31a6643b869de4316283e29da0add906 /spec/unit/other/transbucket.rb | |
parent | 11ae473e3852adcc382a3efea2329586d2e4bcb3 (diff) | |
download | puppet-bbf8a8bfc6a817ea19c4dabe3ce89f09d42df68d.tar.gz puppet-bbf8a8bfc6a817ea19c4dabe3ce89f09d42df68d.tar.xz puppet-bbf8a8bfc6a817ea19c4dabe3ce89f09d42df68d.zip |
Making a few changes to the transportable class to enhance backward compatibility
Diffstat (limited to 'spec/unit/other/transbucket.rb')
-rwxr-xr-x | spec/unit/other/transbucket.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/unit/other/transbucket.rb b/spec/unit/other/transbucket.rb index 10c551752..84cf93fa4 100755 --- a/spec/unit/other/transbucket.rb +++ b/spec/unit/other/transbucket.rb @@ -37,7 +37,17 @@ describe Puppet::TransBucket do proc { @bucket.push "a test" }.should raise_error end - it "should return nil as its reference when type or name is missing" do + it "should return use 'node' as the type and the provided name as the title if only a type is provided" do + @bucket.type = "mystuff" + @bucket.to_ref.should == "Node[mystuff]" + end + + it "should return use 'component' as the type and the provided type as the title if only a name is provided" do + @bucket.name = "mystuff" + @bucket.to_ref.should == "Class[mystuff]" + end + + it "should return nil as its reference when type and name are missing" do @bucket.to_ref.should be_nil end |