summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-11-25 11:13:54 -0800
committertyler-ball <tyleraball@gmail.com>2014-11-25 11:13:54 -0800
commitd3c4c4f9b15ea5abd80e5c90160854e3bae6d5c3 (patch)
treec94dbacbb9d8e69d426941e3a5d539932b7d63be /spec
parent90ac5191358550e5521b2ecb8df027cde6a5e44a (diff)
parent47dbeac97bcb57c0eb90a18992faa44272936db5 (diff)
downloadchef-d3c4c4f9b15ea5abd80e5c90160854e3bae6d5c3.tar.gz
Merge branch 'patch-3' of github.com:justanshulsharma/chef
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/knife/node_run_list_remove_spec.rb21
1 files changed, 18 insertions, 3 deletions
diff --git a/spec/unit/knife/node_run_list_remove_spec.rb b/spec/unit/knife/node_run_list_remove_spec.rb
index ea951e21dd..2c3d29ae73 100644
--- a/spec/unit/knife/node_run_list_remove_spec.rb
+++ b/spec/unit/knife/node_run_list_remove_spec.rb
@@ -66,9 +66,24 @@ describe Chef::Knife::NodeRunListRemove do
expect(@node.run_list).not_to include('role[monkey]')
expect(@node.run_list).not_to include('recipe[duck::type]')
end
+
+ it "should remove the items from the run list when name args contains whitespace" do
+ @node.run_list << 'role[monkey]'
+ @node.run_list << 'recipe[duck::type]'
+ @knife.name_args = [ 'adam', 'role[monkey], recipe[duck::type]' ]
+ @knife.run
+ @node.run_list.should_not include('role[monkey]')
+ @node.run_list.should_not include('recipe[duck::type]')
+ end
+
+ it "should remove the items from the run list when name args contains multiple run lists" do
+ @node.run_list << 'role[blah]'
+ @node.run_list << 'recipe[duck::type]'
+ @knife.name_args = [ 'adam', 'role[monkey], recipe[duck::type]', 'role[blah]' ]
+ @knife.run
+ @node.run_list.should_not include('role[monkey]')
+ @node.run_list.should_not include('recipe[duck::type]')
+ end
end
end
end
-
-
-