diff options
| -rw-r--r-- | spec/bundler/commands/lock_spec.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/spec/bundler/commands/lock_spec.rb b/spec/bundler/commands/lock_spec.rb index 491fa30949..cbf5394588 100644 --- a/spec/bundler/commands/lock_spec.rb +++ b/spec/bundler/commands/lock_spec.rb @@ -1,12 +1,8 @@ # frozen_string_literal: true RSpec.describe "bundle lock" do - def strip_lockfile(lockfile) - strip_whitespace(lockfile).sub(/\n\Z/, "") - end - def read_lockfile(file = "Gemfile.lock") - strip_lockfile bundled_app(file).read + bundled_app(file).read end let(:repo) { gem_repo1 } @@ -19,7 +15,7 @@ RSpec.describe "bundle lock" do gem "foo" G - @lockfile = strip_lockfile(<<-L) + @lockfile = <<~L GEM remote: #{file_uri_for(repo)}/ specs: @@ -58,7 +54,7 @@ RSpec.describe "bundle lock" do it "prints a lockfile when there is no existing lockfile with --print" do bundle "lock --print" - expect(out).to eq(@lockfile) + expect(out).to eq(@lockfile.strip) end it "prints a lockfile when there is an existing lockfile with --print" do @@ -66,7 +62,7 @@ RSpec.describe "bundle lock" do bundle "lock --print" - expect(out).to eq(@lockfile) + expect(out).to eq(@lockfile.strip) end it "writes a lockfile when there is no existing lockfile" do @@ -94,7 +90,7 @@ RSpec.describe "bundle lock" do source "#{file_uri_for(repo)}" gem "foo" G - lockfile = strip_lockfile(<<-L) + lockfile = <<~L GEM remote: #{file_uri_for(repo)}/ specs: |
