Skip to content

Commit 5f78d3c

Browse files
Enable pending exec spec
This is how Ruby works, and it's not going to change. So let's run the test since it makes no sense to keep it pending.
1 parent abb6587 commit 5f78d3c

File tree

1 file changed

+30
-11
lines changed

1 file changed

+30
-11
lines changed

bundler/spec/commands/exec_spec.rb

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -963,23 +963,30 @@ def bin_path(a,b,c)
963963
puts "__FILE__: #{__FILE__.inspect}"
964964
RUBY
965965

966-
let(:expected) { super() + <<~EOS.chomp }
966+
context "when the path is absolute" do
967+
let(:expected) { super() + <<~EOS.chomp }
967968
968-
$0: #{path.to_s.inspect}
969-
__FILE__: #{path.to_s.inspect}
970-
EOS
969+
$0: #{path.to_s.inspect}
970+
__FILE__: #{path.to_s.inspect}
971+
EOS
971972

972-
it "runs" do
973-
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
973+
it "runs" do
974+
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
974975

975-
subject
976-
expect(exitstatus).to eq(exit_code)
977-
expect(err).to eq(expected_err)
978-
expect(out).to eq(expected)
976+
subject
977+
expect(exitstatus).to eq(exit_code)
978+
expect(err).to eq(expected_err)
979+
expect(out).to eq(expected)
980+
end
979981
end
980982

981983
context "when the path is relative" do
982984
let(:path) { super().relative_path_from(bundled_app) }
985+
let(:expected) { super() + <<~EOS.chomp }
986+
987+
$0: #{path.to_s.inspect}
988+
__FILE__: #{path.to_s.inspect}
989+
EOS
983990

984991
it "runs" do
985992
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
@@ -993,8 +1000,20 @@ def bin_path(a,b,c)
9931000

9941001
context "when the path is relative with a leading ./" do
9951002
let(:path) { Pathname.new("./#{super().relative_path_from(bundled_app)}") }
1003+
let(:expected) { super() + <<~EOS.chomp }
1004+
1005+
$0: #{path.to_s.inspect}
1006+
__FILE__: #{File.expand_path(path, bundled_app).inspect}
1007+
EOS
1008+
1009+
it "runs" do
1010+
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
9961011

997-
pending "relative paths with ./ have absolute __FILE__"
1012+
subject
1013+
expect(exitstatus).to eq(exit_code)
1014+
expect(err).to eq(expected_err)
1015+
expect(out).to eq(expected)
1016+
end
9981017
end
9991018
end
10001019

0 commit comments

Comments
 (0)