diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-04-06 19:01:19 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-04-28 19:08:49 +0900 |
commit | fbb4b8d23505be46da7cd996d0c85039cf43b45a (patch) | |
tree | de339a269981224b0057b2bd7c97b1c420fc8600 /test/rubygems/test_gem_ext_cargo_builder.rb | |
parent | 678d58c8508ec46aa270e3c5d81fc09cd0fee175 (diff) |
[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
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5669
Diffstat (limited to 'test/rubygems/test_gem_ext_cargo_builder.rb')
-rw-r--r-- | test/rubygems/test_gem_ext_cargo_builder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_ext_cargo_builder.rb b/test/rubygems/test_gem_ext_cargo_builder.rb index 0c8de2ff6c..ab80e5a6e1 100644 --- a/test/rubygems/test_gem_ext_cargo_builder.rb +++ b/test/rubygems/test_gem_ext_cargo_builder.rb @@ -11,10 +11,10 @@ class TestGemExtCargoBuilder < Gem::TestCase 'RUSTUP_HOME' => File.join(@orig_env['HOME'], '.rustup'), } + super + system(@rust_envs, 'cargo', '-V', out: IO::NULL, err: [:child, :out]) pend 'cargo not present' unless $?.success? - - super end def setup_rust_gem(name) |