Sha256: 28d067ee865bed9235d7161c3bc710a459ab5a1152a38957c9e358aac77963bb
Contents?: true
Size: 658 Bytes
Versions: 2
Compression:
Stored size: 658 Bytes
Contents
require 'spec_helper' describe "Cmds ENV vars" do r_echo_cmd = %{ruby -e "puts ENV['BLAH']"} it "sets basic (path-like) string ENV var" do cmd = Cmds::Cmd.new r_echo_cmd, env: {BLAH: "x:y:z"} expect(cmd.chomp!).to eq "x:y:z" end it "sets a string with spaces in it correctly" do cmd = Cmds::Cmd.new r_echo_cmd, env: {BLAH: "hey there"} expect(cmd.chomp!).to eq "hey there" end it "accepts string keys" do cmd = Cmds::Cmd.new r_echo_cmd, env: { 'BLAH' => [ "/usr/local/bin", "/usr/bin", "/bin" ].join(':') } expect(cmd.chomp!).to eq "/usr/local/bin:/usr/bin:/bin" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cmds-0.1.5 | spec/cmds/env_spec.rb |
cmds-0.1.4 | spec/cmds/env_spec.rb |