From e49c2b8239bea31955fc8513dd1b6cbd8e69bd05 Mon Sep 17 00:00:00 2001 From: Teemu Matilainen Date: Thu, 11 Apr 2013 17:33:23 -0300 Subject: [PATCH] Add a unit test for `solo clean` --- test/solo_clean_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/solo_clean_test.rb b/test/solo_clean_test.rb index 95288956..a798eb5a 100644 --- a/test/solo_clean_test.rb +++ b/test/solo_clean_test.rb @@ -6,6 +6,12 @@ class SoloCleanTest < TestCase include ValidationHelper::ValidationTests + def test_removes_provision_path + cmd = command('somehost', '--provisioning-path=/foo/bar') + cmd.expects(:run_command).with('rm -rf /foo/bar').returns(SuccessfulResult.new) + cmd.run + end + def command(*args) knife_command(Chef::Knife::SoloClean, *args) end