summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-18 11:59:23 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-22 18:45:25 +0100
commitf11c4757a17bea029e1a83ad67c425ccf16133ff (patch)
tree31de646d90de5262c6395d4effa378170d4bf364 /spec
parent810cfbbbbc5b575e4e6a60225471369eb2e8a2d0 (diff)
downloadbundler-f11c4757a17bea029e1a83ad67c425ccf16133ff.tar.gz
Write & read dummy gems binarily
So that they have exactly the same content in all platforms.
Diffstat (limited to 'spec')
-rw-r--r--spec/install/redownload_spec.rb2
-rw-r--r--spec/support/builders.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/install/redownload_spec.rb b/spec/install/redownload_spec.rb
index 818c33bd61..c880b8bb15 100644
--- a/spec/install/redownload_spec.rb
+++ b/spec/install/redownload_spec.rb
@@ -17,7 +17,7 @@ RSpec.describe "bundle install" do
bundle! :install, flag => true
expect(out).to include "Installing rack 1.0.0"
- expect(rack_lib.open(&:read)).to eq("RACK = '1.0.0'\n")
+ expect(rack_lib.binread).to eq("RACK = '1.0.0'\n")
expect(the_bundle).to include_gems "rack 1.0.0"
end
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index 76c9fff463..4a8d699740 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -632,7 +632,7 @@ module Spec
@files.each do |file, source|
file = Pathname.new(path).join(file)
FileUtils.mkdir_p(file.dirname)
- File.open(file, "w") {|f| f.puts source }
+ File.open(file, "wb") {|f| f.puts source }
end
@spec.files = @files.keys
path