This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Added test for custom environment variables

  • Loading branch information...
ivovh committed Apr 13, 2012
1 parent 28cadbe commit eb4d98fc2ec439d9a719ad4ed7e1c35d9fa6ceb6
Showing with 7 additions and 0 deletions.
  1. +7 −0 spec/cocaine/command_line_spec.rb
@@ -26,6 +26,13 @@
output.should match(%r{/path/to/command/dir})
output.should match(%r{/some/other/path})
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
cmd = Cocaine::CommandLine.new("convert",

0 comments on commit eb4d98f

Please sign in to comment.