diff options
Diffstat (limited to 'spec/install/gemfile_spec.rb')
-rw-r--r-- | spec/install/gemfile_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb index 9262dcc92d..d1b1f1e6b8 100644 --- a/spec/install/gemfile_spec.rb +++ b/spec/install/gemfile_spec.rb @@ -66,6 +66,22 @@ RSpec.describe "bundle install" do end end + context "with prefer_gems_rb set" do + before { bundle! "config prefer_gems_rb true" } + + it "prefers gems.rb to Gemfile" do + create_file("gems.rb", "gem 'bundler'") + create_file("Gemfile", "raise 'wrong Gemfile!'") + + bundle! :install + + expect(bundled_app("gems.rb")).to be_file + expect(bundled_app("Gemfile.lock")).not_to be_file + + expect(the_bundle).to include_gem "bundler #{Bundler::VERSION}" + end + end + context "with engine specified in symbol" do it "does not raise any error parsing Gemfile" do simulate_ruby_version "2.3.0" do |