diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/bundler/definition_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/bundler/bundler/definition_spec.rb b/spec/bundler/bundler/definition_spec.rb index 38b37570fe..8736fef060 100644 --- a/spec/bundler/bundler/definition_spec.rb +++ b/spec/bundler/bundler/definition_spec.rb @@ -147,6 +147,34 @@ RSpec.describe Bundler::Definition do G end + it "for a locked gem for another platform" do + install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem "only_java", platform: :jruby + G + + bundle "lock --add-platform java" + bundle :check, :env => { "DEBUG" => 1 } + + expect(out).to match(/using resolution from the lockfile/) + lockfile_should_be <<-G + GEM + remote: #{file_uri_for(gem_repo1)}/ + specs: + only_java (1.1-java) + + PLATFORMS + java + #{lockfile_platforms} + + DEPENDENCIES + only_java + + BUNDLED WITH + #{Bundler::VERSION} + G + end + it "for a rubygems gem" do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" |