diff options
author | Paul Berry <paul@puppetlabs.com> | 2010-12-30 11:26:30 -0800 |
---|---|---|
committer | Paul Berry <paul@puppetlabs.com> | 2010-12-30 11:58:27 -0800 |
commit | 1f72c31f9e0223e71e2729da96e0e98ebea5417e (patch) | |
tree | 704631b3841d536b82cbecc18a1886023dbf94e2 /spec/unit | |
parent | a6cd736379d37c5ca205d74d8a957a6c79f95548 (diff) | |
download | puppet-1f72c31f9e0223e71e2729da96e0e98ebea5417e.tar.gz puppet-1f72c31f9e0223e71e2729da96e0e98ebea5417e.tar.xz puppet-1f72c31f9e0223e71e2729da96e0e98ebea5417e.zip |
(#5715) Added attributes resource_type and title to Puppet::Resource::Status.
These new attributes save report processors from having to parse the
"resource" attribute.
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/resource/status_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/resource/status_spec.rb b/spec/unit/resource/status_spec.rb index 815f799a2..4e76fa463 100755 --- a/spec/unit/resource/status_spec.rb +++ b/spec/unit/resource/status_spec.rb @@ -10,6 +10,11 @@ describe Puppet::Resource::Status do @status = Puppet::Resource::Status.new(@resource) end + it "should compute type and title correctly" do + @status.resource_type.should == "File" + @status.title.should == "/my/file" + end + [:node, :file, :line, :current_values, :status, :evaluation_time].each do |attr| it "should support #{attr}" do @status.send(attr.to_s + "=", "foo") |