mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update the bundler version with master branch
This commit is contained in:
parent
68224651a4
commit
0e60b59d58
Notes:
git
2020-05-13 07:55:16 +09:00
226 changed files with 4605 additions and 3751 deletions
|
@ -4,7 +4,7 @@ RSpec.describe "bundle init" do
|
|||
it "generates a Gemfile" do
|
||||
bundle! :init
|
||||
expect(out).to include("Writing new Gemfile")
|
||||
expect(bundled_app("Gemfile")).to be_file
|
||||
expect(bundled_app_gemfile).to be_file
|
||||
end
|
||||
|
||||
context "when a Gemfile already exists" do
|
||||
|
@ -15,7 +15,7 @@ RSpec.describe "bundle init" do
|
|||
end
|
||||
|
||||
it "does not change existing Gemfiles" do
|
||||
expect { bundle :init }.not_to change { File.read(bundled_app("Gemfile")) }
|
||||
expect { bundle :init }.not_to change { File.read(bundled_app_gemfile) }
|
||||
end
|
||||
|
||||
it "notifies the user that an existing Gemfile already exists" do
|
||||
|
@ -32,9 +32,7 @@ RSpec.describe "bundle init" do
|
|||
|
||||
FileUtils.mkdir bundled_app(subdir)
|
||||
|
||||
Dir.chdir bundled_app(subdir) do
|
||||
bundle! :init
|
||||
end
|
||||
bundle! :init, :dir => bundled_app(subdir)
|
||||
|
||||
expect(out).to include("Writing new Gemfile")
|
||||
expect(bundled_app("#{subdir}/Gemfile")).to be_file
|
||||
|
@ -50,9 +48,7 @@ RSpec.describe "bundle init" do
|
|||
mode = File.stat(bundled_app(subdir)).mode ^ 0o222
|
||||
FileUtils.chmod mode, bundled_app(subdir)
|
||||
|
||||
Dir.chdir bundled_app(subdir) do
|
||||
bundle :init
|
||||
end
|
||||
bundle :init, :dir => bundled_app(subdir)
|
||||
|
||||
expect(err).to include("directory is not writable")
|
||||
expect(Dir[bundled_app("#{subdir}/*")]).to be_empty
|
||||
|
@ -75,7 +71,7 @@ RSpec.describe "bundle init" do
|
|||
|
||||
bundle :init, :gemspec => spec_file
|
||||
|
||||
gemfile = bundled_app("Gemfile").read
|
||||
gemfile = bundled_app_gemfile.read
|
||||
expect(gemfile).to match(%r{source 'https://rubygems.org'})
|
||||
expect(gemfile.scan(/gem "rack", "= 1.0.1"/).size).to eq(1)
|
||||
expect(gemfile.scan(/gem "rspec", "= 1.2"/).size).to eq(1)
|
||||
|
@ -133,9 +129,7 @@ RSpec.describe "bundle init" do
|
|||
|
||||
FileUtils.mkdir bundled_app(subdir)
|
||||
|
||||
Dir.chdir bundled_app(subdir) do
|
||||
bundle! :init
|
||||
end
|
||||
bundle! :init, :dir => bundled_app(subdir)
|
||||
|
||||
expect(out).to include("Writing new gems.rb")
|
||||
expect(bundled_app("#{subdir}/gems.rb")).to be_file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue