Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/teejayvanslyke/whenever i…
Browse files Browse the repository at this point in the history
…nto teejayvanslyke-master
  • Loading branch information
javan committed Mar 6, 2011
2 parents d0a7a86 + fe022bb commit 006a1d9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/whenever/job_list.rb
Expand Up @@ -88,7 +88,7 @@ def environment_variables

output = []
@env.each do |key, val|
output << "#{key}=#{val}\n"
output << "#{key}=#{val.blank? ? '""' : val}\n"
end
output << "\n"

Expand Down
12 changes: 11 additions & 1 deletion test/functional/output_env_test.rb
Expand Up @@ -8,6 +8,8 @@ class OutputEnvTest < Test::Unit::TestCase
<<-file
env :MYVAR, 'blah'
env 'MAILTO', "someone@example.com"
env :BLANKVAR, ''
env :NILVAR, nil
file
end

Expand All @@ -18,6 +20,14 @@ class OutputEnvTest < Test::Unit::TestCase
should "output MAILTO environment variable" do
assert_match "MAILTO=someone@example.com", @output
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

0 comments on commit 006a1d9

Please sign in to comment.