diff options
author | Dominique d'Argent <dominique.dargent@me.com> | 2013-07-26 14:08:26 +0200 |
---|---|---|
committer | Dominique d'Argent <dominique.dargent@me.com> | 2013-07-26 14:08:58 +0200 |
commit | ea250f3b2014301d1a0396ea22e3a894227b9fd0 (patch) | |
tree | d22b8d4ed0efc558704c9c06aa16bde200562a66 | |
parent | 7d6e86d76af5217633f0f1fce56aac691d078aa9 (diff) | |
download | bundler-ea250f3b2014301d1a0396ea22e3a894227b9fd0.tar.gz |
Improve RUBYLIB example in exec spec.
-rw-r--r-- | spec/other/exec_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/other/exec_spec.rb b/spec/other/exec_spec.rb index 488ba53d75..4ed9f2f6aa 100644 --- a/spec/other/exec_spec.rb +++ b/spec/other/exec_spec.rb @@ -123,19 +123,20 @@ describe "bundle exec" do expect(out).to have_rubyopts(rubyopt) end - it "does not duplicate already exec'ed PATH" do + it "does not duplicate already exec'ed RUBYLIB" do install_gemfile <<-G gem "rack" G rubylib = ENV['RUBYLIB'] - rubylib = "#{bundler_path}" + rubylib = "#{rubylib}".split(File::PATH_SEPARATOR).unshift "#{bundler_path}" + rubylib = rubylib.uniq.join(File::PATH_SEPARATOR) bundle "exec 'echo $RUBYLIB'" - expect(out.split(File::PATH_SEPARATOR).count(rubylib)).to eq(1) + expect(out).to eq(rubylib) bundle "exec 'echo $RUBYLIB'", :env => {"RUBYLIB" => rubylib} - expect(out.split(File::PATH_SEPARATOR).count(rubylib)).to eq(1) + expect(out).to eq(rubylib) end it "errors nicely when the argument doesn't exist" do |