summaryrefslogtreecommitdiff
path: root/spec/install/gemfile
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-02-22 10:24:36 +1100
committerSamuel Giddins <segiddins@segiddins.me>2017-02-22 10:27:15 +1100
commitc011e6b1afeba920ba259870296b23f0dd74770f (patch)
tree1f58d3ebc196b4268283500027864923d121975a /spec/install/gemfile
parentd8e009d483b0a077600aefbde85afd8c55995399 (diff)
downloadbundler-c011e6b1afeba920ba259870296b23f0dd74770f.tar.gz
Avoid undefined Bundler::Plugin::API::Source exceptionseg-bundler-plugin-source-api-const-undefined
Diffstat (limited to 'spec/install/gemfile')
-rw-r--r--spec/install/gemfile/gemspec_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb
index 541a7e4008..e2534be1ad 100644
--- a/spec/install/gemfile/gemspec_spec.rb
+++ b/spec/install/gemfile/gemspec_spec.rb
@@ -192,6 +192,26 @@ RSpec.describe "bundle install from an existing gemspec" do
expect(@err).not_to match(/ahh/)
end
+ it "allows the gemspec to activate other gems" do
+ # see https://github.com/bundler/bundler/issues/5409
+ #
+ # issue was caused by rubygems having an unresolved gem during a require,
+ # so emulate that
+ system_gems %w(rack-1.0.0 rack-0.9.1 rack-obama-1.0)
+
+ build_lib("foo", :path => bundled_app)
+ gemspec = bundled_app("foo.gemspec").read
+ bundled_app("foo.gemspec").open("w") do |f|
+ f.write "#{gemspec.strip}.tap { gem 'rack-obama'; require 'rack-obama' }"
+ end
+
+ install_gemfile! <<-G
+ gemspec
+ G
+
+ expect(the_bundle).to include_gem "foo 1.0"
+ end
+
it "allows conflicts" do
build_lib("foo", :path => tmp.join("foo")) do |s|
s.version = "1.0.0"