Merge branch 'master' of https://github.com/teejayvanslyke/whenever into teejayvanslyke-master
This commit is contained in:
commit
006a1d963b
@ -88,7 +88,7 @@ module Whenever
|
|||||||
|
|
||||||
output = []
|
output = []
|
||||||
@env.each do |key, val|
|
@env.each do |key, val|
|
||||||
output << "#{key}=#{val}\n"
|
output << "#{key}=#{val.blank? ? '""' : val}\n"
|
||||||
end
|
end
|
||||||
output << "\n"
|
output << "\n"
|
||||||
|
|
||||||
|
@ -8,6 +8,8 @@ class OutputEnvTest < Test::Unit::TestCase
|
|||||||
<<-file
|
<<-file
|
||||||
env :MYVAR, 'blah'
|
env :MYVAR, 'blah'
|
||||||
env 'MAILTO', "someone@example.com"
|
env 'MAILTO', "someone@example.com"
|
||||||
|
env :BLANKVAR, ''
|
||||||
|
env :NILVAR, nil
|
||||||
file
|
file
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -18,6 +20,14 @@ class OutputEnvTest < Test::Unit::TestCase
|
|||||||
should "output MAILTO environment variable" do
|
should "output MAILTO environment variable" do
|
||||||
assert_match "MAILTO=someone@example.com", @output
|
assert_match "MAILTO=someone@example.com", @output
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "output BLANKVAR environment variable" do
|
||||||
|
assert_match "BLANKVAR=\"\"", @output
|
||||||
|
end
|
||||||
|
|
||||||
|
should "output NILVAR environment variable" do
|
||||||
|
assert_match "NILVAR=\"\"", @output
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user