[rubygems/rubygems] unskip print_args
and fake_man
tests on Windows
https://github.com/rubygems/rubygems/commit/c8eeb0af9d
This commit is contained in:
parent
a7383fc7f4
commit
7bf1612c87
@ -403,8 +403,6 @@ RSpec.describe "bundle exec" do
|
|||||||
each_prefix.call("exec") do |exec|
|
each_prefix.call("exec") do |exec|
|
||||||
describe "when #{exec} is used" do
|
describe "when #{exec} is used" do
|
||||||
before(:each) do
|
before(:each) do
|
||||||
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
|
|
||||||
|
|
||||||
install_gemfile <<-G
|
install_gemfile <<-G
|
||||||
source "https://gem.repo1"
|
source "https://gem.repo1"
|
||||||
gem "myrack"
|
gem "myrack"
|
||||||
@ -435,6 +433,7 @@ RSpec.describe "bundle exec" do
|
|||||||
|
|
||||||
it "shows executable's man page when the executable has a -" do
|
it "shows executable's man page when the executable has a -" do
|
||||||
FileUtils.mv(bundled_app("print_args"), bundled_app("docker-template"))
|
FileUtils.mv(bundled_app("print_args"), bundled_app("docker-template"))
|
||||||
|
FileUtils.mv(bundled_app("print_args.bat"), bundled_app("docker-template.bat")) if Gem.win_platform?
|
||||||
bundle "#{exec} docker-template build discourse --help"
|
bundle "#{exec} docker-template build discourse --help"
|
||||||
expect(out).to eq('args: ["build", "discourse", "--help"]')
|
expect(out).to eq('args: ["build", "discourse", "--help"]')
|
||||||
end
|
end
|
||||||
|
@ -384,12 +384,11 @@ module Spec
|
|||||||
end
|
end
|
||||||
|
|
||||||
def with_fake_man
|
def with_fake_man
|
||||||
skip "fake_man is not a Windows friendly binstub" if Gem.win_platform?
|
|
||||||
|
|
||||||
FileUtils.mkdir_p(tmp("fake_man"))
|
FileUtils.mkdir_p(tmp("fake_man"))
|
||||||
File.open(tmp("fake_man/man"), "w", 0o755) do |f|
|
create_file(tmp("fake_man/man"), <<~SCRIPT)
|
||||||
f.puts "#!/usr/bin/env ruby\nputs ARGV.inspect\n"
|
#!/usr/bin/env ruby
|
||||||
end
|
puts ARGV.inspect
|
||||||
|
SCRIPT
|
||||||
with_path_added(tmp("fake_man")) { yield }
|
with_path_added(tmp("fake_man")) { yield }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user