1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Merge branch 'rmm5t/master'

This commit is contained in:
Jamis Buck 2008-05-11 17:56:21 -06:00
commit 610cb337af
2 changed files with 8 additions and 3 deletions

View file

@ -121,7 +121,7 @@ module Capistrano
options[:env] = env unless env.empty?
shell = options[:shell] || self[:default_shell]
options[:shell] = shell if shell
options[:shell] = shell unless shell.nil?
options
end
@ -144,4 +144,4 @@ module Capistrano
end
end
end
end
end

View file

@ -76,6 +76,11 @@ class ConfigurationActionsInvocationTest < Test::Unit::TestCase
assert_equal({:foo => "bar", :shell => "/bin/bash"}, @config.add_default_command_options(:foo => "bar"))
end
def test_add_default_command_options_should_use_default_shell_of_false_if_present
@config.set :default_shell, false
assert_equal({:foo => "bar", :shell => false}, @config.add_default_command_options(:foo => "bar"))
end
def test_add_default_command_options_should_use_shell_in_preference_of_default_shell
@config.set :default_shell, "/bin/bash"
assert_equal({:foo => "bar", :shell => "/bin/sh"}, @config.add_default_command_options(:foo => "bar", :shell => "/bin/sh"))
@ -200,4 +205,4 @@ class ConfigurationActionsInvocationTest < Test::Unit::TestCase
c = mock("data", :called => true)
Capistrano::Command.expects(:process).with(command, sessions, options).yields(a, b, c)
end
end
end