Skip to content

Commit

Permalink
Add test for multiline env variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimweirich committed Feb 8, 2013
1 parent 886ed91 commit 5b83533
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions test/test_rake_application_options.rb
Expand Up @@ -401,9 +401,21 @@ def test_default_task_collection

def test_environment_definition
ENV.delete('TESTKEY')
command_line("a", "TESTKEY=12")
assert_equal ["a"], @tasks.sort
assert '12', ENV['TESTKEY']
command_line("TESTKEY=12")
assert_equal '12', ENV['TESTKEY']
end

def test_multiline_environment_definition
ENV.delete('TESTKEY')
command_line("TESTKEY=a\nb\n")
assert_equal "a\nb\n", ENV['TESTKEY']
end

def test_environment_and_tasks_together
ENV.delete('TESTKEY')
command_line("a", "b", "TESTKEY=12")
assert_equal ["a", "b"], @tasks.sort
assert_equal '12', ENV['TESTKEY']
end

def test_rake_explicit_task_library
Expand Down

0 comments on commit 5b83533

Please sign in to comment.