From f9dac1bd54af384e99fecf949cad9df9ceb09f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 1 Aug 2019 13:20:58 +0200 Subject: [rubygems/rubygems] Cleanup after testing `rake package` Sometimes it happens to me that my local tests start failing because I pull some file removals or renames into my local copy, and those are still present on my last copy of pkg/. In those cases, the test about `rake package` will fail with something like the following: ```` Failure: TestRakePackage#test_builds_ok [/home/deivid/Code/rubygems/test/rubygems/test_rake_package.rb:13]: Expected `rake package` to work, but got errors: ``` cd pkg/rubygems-update-3.1.0.pre1 WARNING: See http://guides.rubygems.org/specification-reference/ for help rake aborted! Gem::InvalidSpecificationException: ["test/rubygems/test_rake_package.rb"] are not files Tasks: TOP => package => gem => pkg/rubygems-update-3.1.0.pre1.gem (See full trace by running task with --trace) ``` If you have added or removed files, make sure you run `rake update_manifest` to update the `Manifest.txt` accordingly. Expected: true Actual: false ```` So, make sure, package is always built from scratch. https://github.com/rubygems/rubygems/commit/4e2cc9eb26 --- test/rubygems/test_rake_package.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/rubygems') diff --git a/test/rubygems/test_rake_package.rb b/test/rubygems/test_rake_package.rb index 7a2682771e..165da798f5 100644 --- a/test/rubygems/test_rake_package.rb +++ b/test/rubygems/test_rake_package.rb @@ -19,6 +19,8 @@ class TestRakePackage < Minitest::Test If you have added or removed files, make sure you run `rake update_manifest` to update the `Manifest.txt` accordingly MSG + + FileUtils.rm_f "pkg" end end -- cgit v1.2.3