summaryrefslogtreecommitdiff
path: root/lib/rubygems/test_case.rb
AgeCommit message (Collapse)Author
2021-05-28[rubygems/rubygems] Copy files specific to testing rubygems to `test`David Rodríguez
https://github.com/rubygems/rubygems/commit/aa390a3500
2021-05-28[rubygems/rubygems] Try fix ruby-core CIHiroshi SHIBATA
* Port https://github.com/ruby/ruby/commit/8e91b969df08b7a2eb27a5d6d38733eea42dc7ad from ruby-core, and make it compatible with psych 3 & 4.
2021-05-12[rubygems/rubygems] Update the link of minitest code with the commit hash.Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/e7280f8d30 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Removed the related code for minitest-bisectHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/83ebdec27a Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Fixed an intentional blank-lineHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/795b572ac2 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Added comment for Minitest::MockHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/ae44b68d57 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] util/rubocop -aHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/a10ff97830 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Removed minitest/mock from ↵Hiroshi SHIBATA
test/rubygems/test_gem_remote_fetcher.rb https://github.com/rubygems/rubygems/commit/f1af59fe02 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Import capture_subprocess_io from minitestHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/8b2ca6df3a Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Use assert_path_exist and assert_path_not_exist instead ↵Hiroshi SHIBATA
of assert_path_exists and refute_path_exists https://github.com/rubygems/rubygems/commit/a7c93558c3 Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-05-12[rubygems/rubygems] Use test-unit instead of minitestHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/a8571524ad Notes: Merged: https://github.com/ruby/ruby/pull/4491
2021-03-08Sync latest development version of bundler & rubygemsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/4143
2021-01-25Clear each test own temporary directoriesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4117
2021-01-24Revert "Remove temporary directory properly"Nobuyoshi Nakada
This reverts commit 80bad36989bbc4ad6167fe9670327f95b78089ce, because a few CI machines fail continuously.
2021-01-24Remove temporary directory properlyNobuyoshi Nakada
For each `make check`, rubygems test makes "tmp" directory and some "gem_generate_index..." directories remain there. * Do not create a (fixed name) directory in the current working directory * Should remove its own temporary directory Notes: Merged: https://github.com/ruby/ruby/pull/4115
2021-01-04Track RubyGems master(3.3.0.dev) branch at ↵Hiroshi SHIBATA
55634a8af18a52df86c4275d70fa1179118bcc20 Notes: Merged: https://github.com/ruby/ruby/pull/4021
2020-12-08Merge prepare version of RubyGems 3.2.0Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3864
2020-10-15Merge rubygems-3.2.0.rc.2Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3660
2020-09-23Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"Hiroshi SHIBATA
31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://github.com/rubygems/rubygems/pull/3820
2020-09-23Manually merged from https://github.com/rubygems/rubygems/pull/2636Hiroshi SHIBATA
Enable Style/EmptyLinesAroundClassBody rubocop cop.
2020-07-31[rubygems/rubygems] unset XDG_* environmental variables for testing of rubygems.Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/539fd9a39a Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Revert "Disallow warnings to creep into the test suite"David Rodríguez
This reverts commit 694e6afee769ffb3168a564ee7d315af2a934993. It was failed on Windows and I'm unsure why. Also, the check seems brittle since it could fail potentially fail because of warnings outside of our control. https://github.com/rubygems/rubygems/commit/908e9344dd Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Disallow warnings to creep into the test suiteDavid Rodríguez
https://github.com/rubygems/rubygems/commit/694e6afee7 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Fix test warningDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f4c4cddb68 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Don't `super` on main test setupDavid Rodríguez
The `teardown` method doesn't call it either and I don't think it's necessary. https://github.com/rubygems/rubygems/commit/ca2a5d485d Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Remove very old compatibility codeDavid Rodríguez
https://github.com/rubygems/rubygems/commit/6e4bef758b Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31Enforce no empty lines around class body in rubygemsDavid Rodríguez
To normalize the code style with `bundler`. Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-06-17Remove unnecessary stuff from base test caseDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Tweaks to play nicer with ruby-core parallelized testsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Make sure to only reset "dummy" $LOADED_FEATURESDavid Rodríguez
Namely, those generated under `/tmp`. The previous approach was brittle and broken in the case of ruby-core, because under that setup, the current folder is in the original `$LOAD_PATH`, and dummy features are created under `./tmp`, so they were failing to be reset. Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Make sure tmp folder exists before calling `Dir.tmpdir`David Rodríguez
This was guaranteed by our gitignore setup where a `tmp/` folder is always present right after cloning the repository, but was not guaranteed under the ruby-core setup. This alternative approach should always work. Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Revert "Revert "[rubygems/rubygems] Use a local temporary directory""David Rodríguez
This reverts commit 20971d0df41368e0f946683823bc786514e16fef. Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-15Use space inside block braces everywhereDavid Rodríguez
To make rubygems code style consistent with bundler. Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Fix ruby-head failing testsDavid Rodríguez
In `ruby-head` (where system rubygems already has the `XDG` standard implementation), some tests currently depend on the presence of a `~/.gem` folder in the home of the user that runs the tests. If that file is present, tests pass, otherwise they don't. For example, the following passes if you have a `~/.gem` folder but fails otherwise with: ``` $ rake TESTOPTS="--name=/TestGemCommandsGenerateIndexCommand#test_execute$\|TestGemCommandsUpdateCommand#test_execute_user_install/ -v" Run options: "--name=/TestGemCommandsGenerateIndexCommand#test_execute$|TestGemCommandsUpdateCommand#test_execute_user_install/" -v --seed 17318 # Running: TestGemCommandsGenerateIndexCommand#test_execute = 0.02 s = . TestGemCommandsUpdateCommand#test_execute_user_install = /rubygems/test/rubygems/test_gem_commands_update_command.rb:412: warning: instance variable @user_install not initialized 0.04 s = F Finished in 0.095337s, 20.9783 runs/s, 20.9783 assertions/s. 1) Failure: TestGemCommandsUpdateCommand#test_execute_user_install [/rubygems/test/rubygems/test_gem_commands_update_command.rb:414]: user_install must be set on the installer 2 runs, 2 assertions, 1 failures, 0 errors, 0 skips rake aborted! Command failed with status (1) Tasks: TOP => default => test (See full trace by running task with --trace) ``` This is because the very initial `require` of the default `did_you_mean` gem that ruby does on startup runs _before_ the global `setup` hook of our tests run. During this require `Gem.data_home` and its value is memoized to a path in the real users home (not the fake user's home that our tests setup, since that code hasn't run yet). Then that memoized value is used when looking for the default folders to look for gems, and since there's no `~/.gem` folder, its value is actually used as part of the `Gem.user_dir` folder in `Gem::Specification.dirs` (this is how we've approached backwards compatibility for the `XDG` feature). That means dummy test gems with the `--user-install` flag are installed to global, real locations and everything is messed up. This commit fixes the issue by resetting the `Gem.data_home` value in case it has already been memoized. Notes: Merged: https://github.com/ruby/ruby/pull/3211
2020-06-15Revert "Revert "[rubygems/rubygems] Remove unneeded global teardown""David Rodríguez
This reverts commit ac2c07e98373bb62be618001c897fa9d5809d8a4. Notes: Merged: https://github.com/ruby/ruby/pull/3211
2020-06-05[rubygems/rubygems] Respect files loaded from default gems before rubygemsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f3da3c1190 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Fix performance regression in `require`David Rodríguez
Our check for `-I` paths should not go through all activated gems. https://github.com/rubygems/rubygems/commit/00d98eb8a3 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-05-08Revert "[rubygems/rubygems] Remove unneeded global teardown"Hiroshi SHIBATA
This reverts commit 93d1588c782ab9d61699f98b6c64d7f0ab8121c0. Notes: Merged: https://github.com/ruby/ruby/pull/3092
2020-05-08Revert "[rubygems/rubygems] Use a local temporary directory"Hiroshi SHIBATA
This reverts commit e98455f289047c43a733e61ac6317fb74b68de82. Notes: Merged: https://github.com/ruby/ruby/pull/3092
2020-05-08[rubygems/rubygems] Remove unneeded global teardownDavid Rodríguez
Instead, make each test cleanup after itself. https://github.com/rubygems/rubygems/commit/e0aba9d64f Notes: Merged: https://github.com/ruby/ruby/pull/3092
2020-05-08[rubygems/rubygems] Split credential helper as credential_setup and use itHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/b0c55c76ca Notes: Merged: https://github.com/ruby/ruby/pull/3092
2020-05-08[rubygems/rubygems] Suppress warnings coming from `jar-dependencies`David Rodríguez
This is a default gem on jruby, which ships with a rubygems plugin, which prints warnings all over the place during our tests. This plugin is unnecessary from our tests, so I disable it through the `JARS_SKIP` environment variable provided by this gem. https://github.com/rubygems/rubygems/commit/0aabbcf269 Notes: Merged: https://github.com/ruby/ruby/pull/3092
2020-05-08Remove `builder` gem requirement for `gem regenerate_index`David Rodríguez
This requirement was introduced 14 years ago in 7ce7039b390440754954df5efea619e9f57ef823, and I don't think it's necessary anymore. I made several tests introducing UTF-8 characters in gemspec files and generating indexes out of them, and couldn't find any issues. Gemspecs are read with UTF-8 encoding these days. Notes: Merged: https://github.com/ruby/ruby/pull/3092
2020-05-08[rubygems/rubygems] Use a local temporary directoryDavid Rodríguez
To make tests more deterministic, since `Dir.tmpdir` sometimes will return the current directory dependending on the writability of other paths, and in that case since the current directory is changed by our tests, tests can fail. Force a local tmp folder instead, which will always be writable. https://github.com/rubygems/rubygems/commit/3e522bac65 Notes: Merged: https://github.com/ruby/ruby/pull/3092
2020-05-08[rubygems/rubygems] No longer necessaryDavid Rodríguez
Fixed in https://github.com/ruby/ruby/commit/45df1c24d269f93a2bc1e7a6fe0ffcecc1193051, released with ruby 2.3 https://github.com/rubygems/rubygems/commit/f8f67f3952 Notes: Merged: https://github.com/ruby/ruby/pull/3092
2020-05-08[rubygems/rubygems] Refactor ruby command line building for testsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/43819b6973 Notes: Merged: https://github.com/ruby/ruby/pull/3092
2020-05-08[rubygems/rubygems] Remove unnecessary `@@ruby` variableDavid Rodríguez
https://github.com/rubygems/rubygems/commit/5f20647ec1 Notes: Merged: https://github.com/ruby/ruby/pull/3092
2020-05-08[rubygems/rubygems] Add gem build test to check for removed methods.Josef Šimánek
https://github.com/rubygems/rubygems/commit/c07b9cf4f1 Notes: Merged: https://github.com/ruby/ruby/pull/3087
2020-05-08[rubygems/rubygems] Removed deprecated methods for Minitest5Hiroshi SHIBATA
It was migrated on ruby core repository too. https://github.com/ruby/ruby/commit/e5db3da9d34f0a7595208863301c044b612adbed https://github.com/rubygems/rubygems/commit/848bbe3c76 Notes: Merged: https://github.com/ruby/ruby/pull/3087
2020-05-08[rubygems/rubygems] Minitest::Test is works fine with the ruby core repositoryHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/afa01a29a3 Notes: Merged: https://github.com/ruby/ruby/pull/3087