diff options
author | MSP-Greg <Greg.mpls@gmail.com> | 2020-06-17 21:26:13 -0500 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-07-15 16:05:12 +0900 |
commit | 23cf99e99dbae352f8497fb20cc92248c9b63580 (patch) | |
tree | d69c5dee7c126af66812b59cc3ab2d96f0c3d535 /spec/bundler/runtime | |
parent | ad743337b376d8e2a9dae7350b0e89eed636c5bb (diff) |
[rubygems/rubygems] Bundler specs - Windows - remove skips, File.open => File.readlines
Using File.open without a block leaves a file reference that causes issues with file operations
commands/binstubs_spec.rb
install/gems/compact_index_spec.rb
install/gems/dependency_api_spec.rb
install/gems/standalone_spec.rb
runtime/executable_spec.rb
https://github.com/rubygems/rubygems/commit/4b9a6ca156
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3275
Diffstat (limited to 'spec/bundler/runtime')
-rw-r--r-- | spec/bundler/runtime/executable_spec.rb | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/spec/bundler/runtime/executable_spec.rb b/spec/bundler/runtime/executable_spec.rb index 98077efaf0..0f0226fb97 100644 --- a/spec/bundler/runtime/executable_spec.rb +++ b/spec/bundler/runtime/executable_spec.rb @@ -9,8 +9,6 @@ RSpec.describe "Running bin/* commands" do end it "runs the bundled command when in the bundle" do - skip "exec format error" if Gem.win_platform? - bundle "binstubs rack" build_gem "rack", "2.0", :to_system => true do |s| @@ -22,8 +20,6 @@ RSpec.describe "Running bin/* commands" do end it "allows the location of the gem stubs to be specified" do - skip "created in bin :/" if Gem.win_platform? - bundle "binstubs rack", :path => "gbin" expect(bundled_app("bin")).not_to exist @@ -34,8 +30,6 @@ RSpec.describe "Running bin/* commands" do end it "allows absolute paths as a specification of where to install bin stubs" do - skip "exec format error" if Gem.win_platform? - bundle "binstubs rack", :path => tmp("bin") gembin tmp("bin/rackup") @@ -44,19 +38,15 @@ RSpec.describe "Running bin/* commands" do it "uses the default ruby install name when shebang is not specified" do bundle "binstubs rack" - expect(File.open(bundled_app("bin/rackup")).gets).to eq("#!/usr/bin/env #{RbConfig::CONFIG["ruby_install_name"]}\n") + expect(File.readlines(bundled_app("bin/rackup")).first).to eq("#!/usr/bin/env #{RbConfig::CONFIG["ruby_install_name"]}\n") end it "allows the name of the shebang executable to be specified" do - skip "not created with custom name :/" if Gem.win_platform? - bundle "binstubs rack", :shebang => "ruby-foo" - expect(File.open(bundled_app("bin/rackup")).gets).to eq("#!/usr/bin/env ruby-foo\n") + expect(File.readlines(bundled_app("bin/rackup")).first).to eq("#!/usr/bin/env ruby-foo\n") end it "runs the bundled command when out of the bundle" do - skip "exec format error" if Gem.win_platform? - bundle "binstubs rack" build_gem "rack", "2.0", :to_system => true do |s| @@ -68,8 +58,6 @@ RSpec.describe "Running bin/* commands" do end it "works with gems in path" do - skip "exec format error" if Gem.win_platform? - build_lib "rack", :path => lib_path("rack") do |s| s.executables = "rackup" end @@ -100,8 +88,6 @@ RSpec.describe "Running bin/* commands" do end it "does not generate bin stubs if the option was not specified" do - skip "generated :/" if Gem.win_platform? - bundle "install" expect(bundled_app("bin/rackup")).not_to exist @@ -153,8 +139,6 @@ RSpec.describe "Running bin/* commands" do end it "use BUNDLE_GEMFILE gemfile for binstub" do - skip "exec format error" if Gem.win_platform? - # context with bin/bundler w/ default Gemfile bundle "binstubs bundler" |