spec/kitchen/provisioner/chef_solo_spec.rb in test-kitchen-1.4.2 vs spec/kitchen/provisioner/chef_solo_spec.rb in test-kitchen-1.5.0.rc.1
- old
+ new
@@ -294,9 +294,26 @@
describe "#run_command" do
let(:cmd) { provisioner.run_command }
+ describe "common behavior" do
+
+ before { platform.stubs(:shell_type).returns("fake") }
+
+ it "prefixs the whole command with the command_prefix if set" do
+ config[:command_prefix] = "my_prefix"
+
+ cmd.must_match(/\Amy_prefix /)
+ end
+
+ it "does not prefix the command if command_prefix is not set" do
+ config[:command_prefix] = nil
+
+ cmd.wont_match(/\Amy_prefix /)
+ end
+ end
+
describe "for bourne shells" do
before { platform.stubs(:shell_type).returns("bourne") }
it "uses bourne shell" do