summaryrefslogtreecommitdiff
path: root/lib/rubygems/core_ext
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-05-21 18:52:30 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-05 07:32:42 +0900
commitb35793e0e74c8abc39d0ae58f75a6ea10983749c (patch)
tree8defd7f66e4c822989910504303b6b14ee169086 /lib/rubygems/core_ext
parent8739bc449f7f560fe0c5addf7da2e73f4537b0cf (diff)
[rubygems/rubygems] Fix test warnings
Since `rake package` started printing to stdout by default, we get these warnings printed when running rubygems tests: ``` $ rake Run options: --seed 6097 # Running: ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................mkdir -p pkg mkdir -p pkg/pkgr-1.2.3 rm -f pkg/pkgr-1.2.3/x ln x pkg/pkgr-1.2.3/x rm -f pkg/pkgr-1.2.3/y ln y pkg/pkgr-1.2.3/y cd pkg/pkgr-1.2.3 cd - .... Finished in 50.578889s, 43.0812 runs/s, 134.8191 assertions/s. 2179 runs, 6819 assertions, 0 failures, 0 errors, 0 skips Coverage report generated for Unit Tests to /home/deivid/Code/rubygems/coverage. 8080 / 8978 LOC (90.0%) covered. ``` The reason is that, although these tests wrap the `Rake.application["package"].invoke` with a `capture_io` block, the rake application initialization happens outside of this block, and a copy of `$stdout` is saved in there, and that's where the task prints. So the `capture_io` `$stdout` and `$stderr` dance is not effective. To fix, we move the `Rake` application initialization inside the `capture_io` block. https://github.com/rubygems/rubygems/commit/7f6e2398a5
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3184
Diffstat (limited to 'lib/rubygems/core_ext')
0 files changed, 0 insertions, 0 deletions