Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

Commit

Permalink
Added test for custom environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivo van Hurne committed Apr 13, 2012
1 parent 28cadbe commit eb4d98f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/cocaine/command_line_spec.rb
Expand Up @@ -26,6 +26,13 @@
output.should match(%r{/path/to/command/dir}) output.should match(%r{/path/to/command/dir})
output.should match(%r{/some/other/path}) output.should match(%r{/some/other/path})
end end

it "temporarily changes specified environment variables" do
Cocaine::CommandLine.environment['TEST'] = 'Hello, world!'
cmd = Cocaine::CommandLine.new("ruby", "-e 'puts ENV[%{TEST}]'")
output = cmd.run
output.should match(%r{Hello, world!})
end


it "can interpolate quoted variables into the command line's parameters" do it "can interpolate quoted variables into the command line's parameters" do
cmd = Cocaine::CommandLine.new("convert", cmd = Cocaine::CommandLine.new("convert",
Expand Down

0 comments on commit eb4d98f

Please sign in to comment.