diff options
| author | Luke Kanies <luke@reductivelabs.com> | 2010-01-20 01:50:27 -0800 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | a9fc13409db7147918eeeb47e91315c6eb980432 (patch) | |
| tree | 0a67adce342a5cfff806ea183d749c1fb4aad764 /spec | |
| parent | a18769da31e03e05277d6ad52ca1f38acee5ecbd (diff) | |
Removing mention of @changes in Transaction
This is handled in the Status instances now.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/transaction.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/unit/transaction.rb b/spec/unit/transaction.rb index e2ab00748..3fcbccac4 100755 --- a/spec/unit/transaction.rb +++ b/spec/unit/transaction.rb @@ -256,6 +256,28 @@ describe Puppet::Transaction do @transaction.prefetch end end + + describe "when determining changed resources" do + before :each do + @catalog = Puppet::Resource::Catalog.new + @transaction = Puppet::Transaction.new(@catalog) + end + + it "should return all resources for which the resource status indicates the resource has changed" do + names = [] + 2.times do |i| + name = "/my/file#{i}" + resource = Puppet::Type.type(:file).new :path => name + names << resource.to_s + @catalog.add_resource resource + @transaction.add_resource_status Puppet::Resource::Status.new(resource) + end + + @transaction.resource_status(names[0]).changed = true + + @transaction.changed?.should == [@catalog.resource(names[0])] + end + end end describe Puppet::Transaction, " when determining tags" do |
