diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2009-11-10 02:58:02 -0800 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-11-19 03:35:31 +1100 |
| commit | c1e47a43df40abd5da04bf147df17f0b53bf0868 (patch) | |
| tree | 75424d94dfeb10d5e70ffe7b9ec9a5b6ce4eaced /spec | |
| parent | 106c9a91929f00a852f7027088cee6684f83ab63 (diff) | |
| download | puppet-c1e47a43df40abd5da04bf147df17f0b53bf0868.tar.gz puppet-c1e47a43df40abd5da04bf147df17f0b53bf0868.tar.xz puppet-c1e47a43df40abd5da04bf147df17f0b53bf0868.zip | |
Fixing #2789 puppetrun fails without --tag
Puppet::Transaction was handling "tags" strings differently depending on
whether they came in from Puppet[:tags] or another source.
This was causing puppetrun's tags to be misparsed if there was not
exactly one --tag parameter.
I've moved the code to Util::Tagging.
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/transaction.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/transaction.rb b/spec/unit/transaction.rb index ff01eac22..1b3562153 100755 --- a/spec/unit/transaction.rb +++ b/spec/unit/transaction.rb @@ -133,4 +133,14 @@ describe Puppet::Transaction, " when determining tags" do @transaction.tags = "one::two" @transaction.tags.should == %w{one::two} end + + it "should accept a comma-delimited string" do + @transaction.tags = "one, two" + @transaction.tags.should == %w{one two} + end + + it "should accept an empty string" do + @transaction.tags = "" + @transaction.tags.should == [] + end end |
