diff options
Diffstat (limited to 'spec/unit/knife/node_run_list_remove_spec.rb')
-rw-r--r-- | spec/unit/knife/node_run_list_remove_spec.rb | 21 |
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 5a008a3e07..744c24596a 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 @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 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[monkey]' + @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 - - - |