diff options
| -rw-r--r-- | spec/bundler/commands/exec_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/bundler/commands/exec_spec.rb b/spec/bundler/commands/exec_spec.rb index ec8f4c5b89..aa504ea2a7 100644 --- a/spec/bundler/commands/exec_spec.rb +++ b/spec/bundler/commands/exec_spec.rb @@ -1200,11 +1200,11 @@ RSpec.describe "bundle exec" do context "with a system gem that shadows a default gem" do let(:openssl_version) { "99.9.9" } - let(:expected) { ruby "gem 'openssl', '< 999999'; require 'openssl'; puts OpenSSL::VERSION", artifice: nil, raise_on_error: false } it "only leaves the default gem in the stdlib available" do + default_openssl_version = ruby "require 'openssl'; puts OpenSSL::VERSION" + skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform? - skip "openssl isn't a default gem" if expected.empty? install_gemfile "source \"https://gem.repo1\"" # must happen before installing the broken system gem @@ -1229,10 +1229,10 @@ RSpec.describe "bundle exec" do env = { "PATH" => path } aggregate_failures do - expect(bundle("exec #{file}", artifice: nil, env: env)).to eq(expected) - expect(bundle("exec bundle exec #{file}", artifice: nil, env: env)).to eq(expected) - expect(bundle("exec ruby #{file}", artifice: nil, env: env)).to eq(expected) - expect(run(file.read, artifice: nil, env: env)).to eq(expected) + expect(bundle("exec #{file}", artifice: nil, env: env)).to eq(default_openssl_version) + expect(bundle("exec bundle exec #{file}", artifice: nil, env: env)).to eq(default_openssl_version) + expect(bundle("exec ruby #{file}", artifice: nil, env: env)).to eq(default_openssl_version) + expect(run(file.read, artifice: nil, env: env)).to eq(default_openssl_version) end skip "ruby_core has openssl and rubygems in the same folder, and this test needs rubygems require but default openssl not in a directly added entry in $LOAD_PATH" if ruby_core? |
