[rubygems/rubygems] Fix test errors when cargo
not present
Currently our tests try to detect whether `cargo` is installed or not, and if not, set tests that need `cargo` as pending. However, when this happens that test `setup` method is completely skipped, meaning that the `teardown` method will blow up when trying to switch back to the original folder, since it was not set. This commit fixes that. https://github.com/rubygems/rubygems/commit/1e4c1e6492
This commit is contained in:
parent
678d58c850
commit
fbb4b8d235
Notes:
git
2022-04-28 19:09:13 +09:00
@ -11,10 +11,10 @@ class TestGemExtCargoBuilder < Gem::TestCase
|
|||||||
'RUSTUP_HOME' => File.join(@orig_env['HOME'], '.rustup'),
|
'RUSTUP_HOME' => File.join(@orig_env['HOME'], '.rustup'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super
|
||||||
|
|
||||||
system(@rust_envs, 'cargo', '-V', out: IO::NULL, err: [:child, :out])
|
system(@rust_envs, 'cargo', '-V', out: IO::NULL, err: [:child, :out])
|
||||||
pend 'cargo not present' unless $?.success?
|
pend 'cargo not present' unless $?.success?
|
||||||
|
|
||||||
super
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_rust_gem(name)
|
def setup_rust_gem(name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user