summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/other/transaction.rb5
-rwxr-xr-xspec/unit/parser/resource.rb6
2 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/other/transaction.rb b/spec/unit/other/transaction.rb
index e277a24c0..0db470d26 100755
--- a/spec/unit/other/transaction.rb
+++ b/spec/unit/other/transaction.rb
@@ -25,4 +25,9 @@ describe Puppet::Transaction, " when determining tags" do
@transaction.tags = %w{one two}
@transaction.tags.should == %w{one two}
end
+
+ it "should always convert assigned tags to an array" do
+ @transaction.tags = "one::two"
+ @transaction.tags.should == %w{one::two}
+ end
end
diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb
index 035590341..9ce7b391b 100755
--- a/spec/unit/parser/resource.rb
+++ b/spec/unit/parser/resource.rb
@@ -67,6 +67,12 @@ describe Puppet::Parser::Resource do
@resource = Puppet::Parser::Resource.new(:type => "mydefine", :title => "whatever", :scope => @scope, :source => @source)
end
+ it "should do nothing if it has already been finished" do
+ @resource.finish
+ @resource.expects(:add_metaparams).never
+ @resource.finish
+ end
+
it "should copy metaparams from its scope" do
@scope.setvar("noop", "true")