summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSutou Kouhei <kou@clear-code.com>2020-01-05 07:23:05 +0900
committerSutou Kouhei <kou@clear-code.com>2020-01-15 06:27:03 +0900
commit2a374012d4d977905b01fb0d789375e274d1be13 (patch)
treea24c3a923c3e3d6851ef2bfee4b105f72c67ac97 /spec
parent13f5a8a72090727e55ec789f44a1820ad61069d3 (diff)
downloadbundler-2a374012d4d977905b01fb0d789375e274d1be13.tar.gz
Don't set platforms to dependency registered by gemspec
Platform related dependencies are resolved in Resolver now. So we don't need to register all available platforms explicitly. This reverts commit 0a8ca4879e0b79aa4109a0dc424940b079ef38d0. See also: #4150 and #4102
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/dsl_spec.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb
index 319472d4b0..9299c014af 100644
--- a/spec/bundler/dsl_spec.rb
+++ b/spec/bundler/dsl_spec.rb
@@ -174,41 +174,6 @@ RSpec.describe Bundler::Dsl do
end
end
- describe "#gemspec" do
- let(:spec) do
- Gem::Specification.new do |gem|
- gem.name = "example"
- gem.platform = platform
- end
- end
-
- before do
- allow(Dir).to receive(:[]).and_return(["spec_path"])
- allow(Bundler).to receive(:load_gemspec).with("spec_path").and_return(spec)
- allow(Bundler).to receive(:default_gemfile).and_return(Pathname.new("./Gemfile"))
- end
-
- context "with a ruby platform" do
- let(:platform) { "ruby" }
-
- it "keeps track of the ruby platforms in the dependency" do
- allow(Gem::Platform).to receive(:local).and_return(rb)
- subject.gemspec
- expect(subject.dependencies.last.platforms).to eq(Bundler::Dependency::REVERSE_PLATFORM_MAP[Gem::Platform::RUBY])
- end
- end
-
- context "with a jruby platform" do
- let(:platform) { "java" }
-
- it "keeps track of the jruby platforms in the dependency" do
- allow(Gem::Platform).to receive(:local).and_return(java)
- subject.gemspec
- expect(subject.dependencies.last.platforms).to eq(Bundler::Dependency::REVERSE_PLATFORM_MAP[Gem::Platform::JAVA])
- end
- end
- end
-
context "can bundle groups of gems with" do
# git "https://github.com/rails/rails.git" do
# gem "railties"