minitest 5.11.3 → 5.22.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +280 -4
- data/Manifest.txt +4 -0
- data/README.rdoc +104 -17
- data/Rakefile +5 -16
- data/lib/hoe/minitest.rb +0 -4
- data/lib/minitest/assertions.rb +209 -42
- data/lib/minitest/benchmark.rb +7 -7
- data/lib/minitest/compress.rb +94 -0
- data/lib/minitest/expectations.rb +72 -35
- data/lib/minitest/mock.rb +123 -34
- data/lib/minitest/pride_plugin.rb +8 -11
- data/lib/minitest/spec.rb +27 -9
- data/lib/minitest/test.rb +48 -19
- data/lib/minitest/test_task.rb +301 -0
- data/lib/minitest/unit.rb +5 -8
- data/lib/minitest.rb +247 -69
- data/test/minitest/metametameta.rb +52 -12
- data/test/minitest/test_minitest_assertions.rb +1721 -0
- data/test/minitest/test_minitest_benchmark.rb +2 -2
- data/test/minitest/test_minitest_mock.rb +289 -17
- data/test/minitest/test_minitest_reporter.rb +160 -19
- data/test/minitest/test_minitest_spec.rb +314 -155
- data/test/minitest/test_minitest_test.rb +429 -1196
- data/test/minitest/test_minitest_test_task.rb +48 -0
- data.tar.gz.sig +0 -0
- metadata +38 -23
- metadata.gz.sig +0 -0
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 549d1470d48f7424db415007d45cfd317ad88104e1e5004e97c46afa4d760a1a
         | 
| 4 | 
            +
              data.tar.gz: f6f2e952c63cb9074d2fccf45148ab5c5045aec5bdbeadfadcbbf8338107ec2d
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: da1e40c0087e97affdab34c247b98d5d4482ba47d3a0b677dcef4ebf0839827e304fba101a02fcebd38008a8d9ba9eaa163e98545d13927b276dcb461dac7237
         | 
| 7 | 
            +
              data.tar.gz: c4074d137040f0362af40a5cd9c637492ba983a0a8ab5341c2acb8d531725b10192c40b6002570695aca6da1c0c1bdb389a6eac94cefcda8a6b60d48b49c960d
         | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | Binary file | 
    
        data/History.rdoc
    CHANGED
    
    | @@ -1,3 +1,280 @@ | |
| 1 | 
            +
            === 5.22.2 / 2024-02-07
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            * 1 bug fix:
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              * Third time's a charm? Remember: 'ensure' is almost always the
         | 
| 6 | 
            +
                wrong way to go (for results... it's great for cleaning up).
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            === 5.22.1 / 2024-02-06
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            * 1 bug fix:
         | 
| 11 | 
            +
             | 
| 12 | 
            +
              * Don't exit non-zero if no tests ran and no filter (aka, the test file is empty).
         | 
| 13 | 
            +
                (I'm starting to think the exit 1 thing for @tenderlove was a mistake...)
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            === 5.22.0 / 2024-02-05
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            * 1 minor enhancement:
         | 
| 18 | 
            +
             | 
| 19 | 
            +
              * Added "did you mean" output if your --name filter matches nothing. (tenderlove)
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            * 2 bug fixes:
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              * Big cleanup of test filtering. Much prettier / more functional.
         | 
| 24 | 
            +
              * Fix situation where Assertion#location can't find the location. (pftg)
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            === 5.21.2 / 2024-01-17
         | 
| 27 | 
            +
             | 
| 28 | 
            +
            * 1 bug fix:
         | 
| 29 | 
            +
             | 
| 30 | 
            +
              * Fixed bug in Minitest::Compress#compress formatting w/ nested patterns. Now recurses properly.
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            === 5.21.1 / 2024-01-11
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            * 1 bug fix:
         | 
| 35 | 
            +
             | 
| 36 | 
            +
              * Rails' default backtrace filter can't currently work with caller_locations, so reverting back to caller.
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            === 5.21.0 / 2024-01-11
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            * 10 minor enhancements:
         | 
| 41 | 
            +
             | 
| 42 | 
            +
              * Add include_all kw arg to assert_respond_to and refute_respond_to.
         | 
| 43 | 
            +
              * Added --quiet flag to skip ProgressReporter (prints the dots). Minor speedup.
         | 
| 44 | 
            +
              * Added Minitest::Compress#compress and added it to UnexpectedError.
         | 
| 45 | 
            +
              * Added ability to initialize BacktraceFilter w/ custom regexp.
         | 
| 46 | 
            +
              * Filter failure backtraces using backtrace_filter before calculating location. (thomasmarshall)
         | 
| 47 | 
            +
              * Make BacktraceFilter#filter compatible with locations (still compares strings).
         | 
| 48 | 
            +
              * Optimized Assertion#location ~30%.
         | 
| 49 | 
            +
              * Output relative paths for all failures/errors/backtraces.
         | 
| 50 | 
            +
              * Refactored location information in assertions, now using locations.
         | 
| 51 | 
            +
              * Removed thread and mutex_m dependencies. (hsbt, eregon)
         | 
| 52 | 
            +
             | 
| 53 | 
            +
            * 2 bug fixes:
         | 
| 54 | 
            +
             | 
| 55 | 
            +
              * Drop undocumented bt arg in #skip. Dunno why that ever happened, prolly for testing?
         | 
| 56 | 
            +
              * Fix mock to work with ruby debugger enabled. (keithlayne)
         | 
| 57 | 
            +
             | 
| 58 | 
            +
            === 5.20.0 / 2023-09-06
         | 
| 59 | 
            +
             | 
| 60 | 
            +
            * 1 minor enhancement:
         | 
| 61 | 
            +
             | 
| 62 | 
            +
              * Optionally allow autorun exit hook to remain active in forked child. (casperisfine)
         | 
| 63 | 
            +
             | 
| 64 | 
            +
            === 5.19.0 / 2023-07-26
         | 
| 65 | 
            +
             | 
| 66 | 
            +
            * 2 minor enhancements:
         | 
| 67 | 
            +
             | 
| 68 | 
            +
              * Add metadata lazy accessor to Runnable / Result. (matteeyah)
         | 
| 69 | 
            +
              * Only load minitest/unit (aka ancient MiniTest compatibility layer) if \ENV[\"MT_COMPAT\"]
         | 
| 70 | 
            +
             | 
| 71 | 
            +
            * 1 bug fix:
         | 
| 72 | 
            +
             | 
| 73 | 
            +
              * Minitest::TestTask enthusiastically added itself to default. (ParadoxV5)
         | 
| 74 | 
            +
             | 
| 75 | 
            +
            === 5.18.1 / 2023-06-16
         | 
| 76 | 
            +
             | 
| 77 | 
            +
            * 3 bug fixes:
         | 
| 78 | 
            +
             | 
| 79 | 
            +
              * Avoid extra string allocations when filtering tests. (tenderlove)
         | 
| 80 | 
            +
              * Only mention deprecated \ENV[\'N\'] if it is an integer string.
         | 
| 81 | 
            +
              * Push up test_order to Minitest::Runnable to fix minitest/hell. (koic)
         | 
| 82 | 
            +
             | 
| 83 | 
            +
            === 5.18.0 / 2023-03-04
         | 
| 84 | 
            +
             | 
| 85 | 
            +
            * 2 major enhancements:
         | 
| 86 | 
            +
             | 
| 87 | 
            +
              * Added assert_pattern & refute_pattern for pattern matching. (flavorjones)
         | 
| 88 | 
            +
              * Added matching must_pattern_match & wont_pattern_match to minitest/spec.
         | 
| 89 | 
            +
             | 
| 90 | 
            +
            * 1 bug fix:
         | 
| 91 | 
            +
             | 
| 92 | 
            +
              * Support the new message format of NameError in Ruby 3.3 (mame)
         | 
| 93 | 
            +
             | 
| 94 | 
            +
            === 5.17.0 / 2022-12-31
         | 
| 95 | 
            +
             | 
| 96 | 
            +
            * 1 minor enhancement:
         | 
| 97 | 
            +
             | 
| 98 | 
            +
              * Refactor setup hooks into a SETUP_METHODS constant. (MSP-Greg)
         | 
| 99 | 
            +
             | 
| 100 | 
            +
            * 3 bug fixes:
         | 
| 101 | 
            +
             | 
| 102 | 
            +
              * Fix kwargs for Mock calls to delegator. (blowmage)
         | 
| 103 | 
            +
              * Fix kwargs for expectations. (bobmazanec, blowmage)
         | 
| 104 | 
            +
              * Remove check for .b method. (tenderlove)
         | 
| 105 | 
            +
             | 
| 106 | 
            +
            === 5.16.3 / 2022-08-17
         | 
| 107 | 
            +
             | 
| 108 | 
            +
            * 2 bug fixes:
         | 
| 109 | 
            +
             | 
| 110 | 
            +
              * Fixed exception sanitization by removing TypeError restriction on rescue.
         | 
| 111 | 
            +
              * Use A instead of deprecated TESTOPTS in rake test:slow. (davidstosik)
         | 
| 112 | 
            +
             | 
| 113 | 
            +
            === 5.16.2 / 2022-07-03
         | 
| 114 | 
            +
             | 
| 115 | 
            +
            * 4 bug fixes:
         | 
| 116 | 
            +
             | 
| 117 | 
            +
              * Added MT_KWARGS_HACK kludge for stub to deal with ruby 2.7 kwargs nastiness. (tsugimoto)
         | 
| 118 | 
            +
              * In #expect, pop Hash class from args if $MT_KWARGS_HACK. (casperisfine)
         | 
| 119 | 
            +
              * In above scenario, set expected kwargs (as Objects) based on actual kwargs.
         | 
| 120 | 
            +
              * Nuke ivars if exception fails to marshal twice (eg better_errors). (irphilli)
         | 
| 121 | 
            +
             | 
| 122 | 
            +
            === 5.16.1 / 2022-06-20
         | 
| 123 | 
            +
             | 
| 124 | 
            +
            * 2 bug fixes:
         | 
| 125 | 
            +
             | 
| 126 | 
            +
              * Apparently adding real kwarg support to mocks/stubs broke some code. Fixed.
         | 
| 127 | 
            +
                * Use `MT_KWARGS_HACK=1` to activate the kludgy kwargs support w/ caveats.
         | 
| 128 | 
            +
              * Clarified some doco wrt the block on #stub.
         | 
| 129 | 
            +
             | 
| 130 | 
            +
            === 5.16.0 / 2022-06-14
         | 
| 131 | 
            +
             | 
| 132 | 
            +
            * 2 major enhancements:
         | 
| 133 | 
            +
             | 
| 134 | 
            +
              * Added Minitest::TestTask.
         | 
| 135 | 
            +
              * Dropping ruby 2.2 - 2.5. 2.6 is DTM soon too.
         | 
| 136 | 
            +
             | 
| 137 | 
            +
            * 11 minor enhancements:
         | 
| 138 | 
            +
             | 
| 139 | 
            +
              * Added --show-skips option to show skips at end of run but not require --verbose. (MSP-Greg)
         | 
| 140 | 
            +
              * Added Minitest.seed, the random seed used by the run.
         | 
| 141 | 
            +
              * Calling `srand Minitest.seed` before all shuffles to ensure determinism.
         | 
| 142 | 
            +
              * Extended #stub to handle kwargs for both block and call args. (SampsonCrowley)
         | 
| 143 | 
            +
              * Extended Mock#__call to display kwargs.
         | 
| 144 | 
            +
              * Extended Mock#expect to record kwargs.
         | 
| 145 | 
            +
              * Extended Mock#method_missing to take kwargs & compare them against expected.
         | 
| 146 | 
            +
              * Mock#method_missing displays better errors on arity mismatch.
         | 
| 147 | 
            +
              * Removed minor optimization removing empty suites before run.
         | 
| 148 | 
            +
              * Simplified test randomization (test order will change even with fixed seed).
         | 
| 149 | 
            +
              * assert_match now returns the MatchData on success. (Nakilon)
         | 
| 150 | 
            +
             | 
| 151 | 
            +
            * 3 bug fixes:
         | 
| 152 | 
            +
             | 
| 153 | 
            +
              * (Re)Fixed marshalling of exceptions, neutering them in 2 passes.
         | 
| 154 | 
            +
              * Fixed more problems with rdoc.
         | 
| 155 | 
            +
              * Had to patch up mock and stub to deal with <=2.7 kwargs oddities
         | 
| 156 | 
            +
             | 
| 157 | 
            +
            === 5.15.0 / 2021-12-14
         | 
| 158 | 
            +
             | 
| 159 | 
            +
            * 1 major enhancement:
         | 
| 160 | 
            +
             | 
| 161 | 
            +
              * assert_throws returns the value returned, if any. (volmer)
         | 
| 162 | 
            +
             | 
| 163 | 
            +
            * 3 minor enhancements:
         | 
| 164 | 
            +
             | 
| 165 | 
            +
              * Added -S <CODES> option to skip reporting of certain types of output
         | 
| 166 | 
            +
              * Enable Ruby deprecation warnings by default. (casperisfine)
         | 
| 167 | 
            +
              * Use Etc.nprocessors by default in order to maximize cpu usage. (tonytonyjan)
         | 
| 168 | 
            +
             | 
| 169 | 
            +
            * 6 bug fixes:
         | 
| 170 | 
            +
             | 
| 171 | 
            +
              * Close then unlink tempfiles on Windows. (nobu)
         | 
| 172 | 
            +
              * Fixed #skip_until for windows paths. (MSP-Greg)
         | 
| 173 | 
            +
              * Fixed a bunch of tests for jruby and windows. (MSP-Greg)
         | 
| 174 | 
            +
              * Fixed marshalling of specs if they error. (tenderlove, jeremyevans, et al)
         | 
| 175 | 
            +
              * Updated deprecation message for block expectations. (blowmage)
         | 
| 176 | 
            +
              * Use Kernel.warn directly in expectations in case CUT defines their own warn. (firien)
         | 
| 177 | 
            +
             | 
| 178 | 
            +
            === 5.14.4 / 2021-02-23
         | 
| 179 | 
            +
             | 
| 180 | 
            +
            * 1 bug fix:
         | 
| 181 | 
            +
             | 
| 182 | 
            +
              * Fixed deprecation warning using stub with methods using keyword arguments. (Nakilon)
         | 
| 183 | 
            +
             | 
| 184 | 
            +
            === 5.14.3 / 2021-01-05
         | 
| 185 | 
            +
             | 
| 186 | 
            +
            * 1 bug fix:
         | 
| 187 | 
            +
             | 
| 188 | 
            +
              * Bumped require_ruby_version to < 4 (trunk = 3.1).
         | 
| 189 | 
            +
             | 
| 190 | 
            +
            === 5.14.2 / 2020-08-31
         | 
| 191 | 
            +
             | 
| 192 | 
            +
            * 1 bug fix:
         | 
| 193 | 
            +
             | 
| 194 | 
            +
              * Bumped ruby version to include 3.0 (trunk).
         | 
| 195 | 
            +
             | 
| 196 | 
            +
            === 5.14.1 / 2020-05-15
         | 
| 197 | 
            +
             | 
| 198 | 
            +
            * 3 minor enhancements:
         | 
| 199 | 
            +
             | 
| 200 | 
            +
              * Minitest.filter_backtrace returns original backtrace if filter comes back empty.
         | 
| 201 | 
            +
              * Minitest::BacktraceFilter now returns entire backtrace if $MT_DEBUG set in env.
         | 
| 202 | 
            +
              * Return true on a successful refute. (jusleg)
         | 
| 203 | 
            +
             | 
| 204 | 
            +
            * 1 bug fix:
         | 
| 205 | 
            +
             | 
| 206 | 
            +
              * Fixed expectation doco to not use global expectations.
         | 
| 207 | 
            +
             | 
| 208 | 
            +
            === 5.14.0 / 2020-01-11
         | 
| 209 | 
            +
             | 
| 210 | 
            +
            * 2 minor enhancements:
         | 
| 211 | 
            +
             | 
| 212 | 
            +
              * Block-assertions (eg assert_output) now error if raised inside the block. (casperisfine)
         | 
| 213 | 
            +
              * Changed assert_raises to only catch Assertion since that covers Skip and friends.
         | 
| 214 | 
            +
             | 
| 215 | 
            +
            * 3 bug fixes:
         | 
| 216 | 
            +
             | 
| 217 | 
            +
              * Added example for value wrapper with block to Expectations module. (stomar)
         | 
| 218 | 
            +
              * Fixed use of must/wont_be_within_delta on Expectation instance. (stomar)
         | 
| 219 | 
            +
              * Renamed UnexpectedError#exception to #error to avoid problems with reraising. (casperisfine)
         | 
| 220 | 
            +
             | 
| 221 | 
            +
            === 5.13.0 / 2019-10-29
         | 
| 222 | 
            +
             | 
| 223 | 
            +
            * 9 minor enhancements:
         | 
| 224 | 
            +
             | 
| 225 | 
            +
              * Added Minitest::Guard#osx?
         | 
| 226 | 
            +
              * Added examples to documentation for assert_raises. (lxxxvi)
         | 
| 227 | 
            +
              * Added expectations #path_must_exist and #path_wont_exist. Not thrilled with the names.
         | 
| 228 | 
            +
              * Added fail_after(year, month, day, msg) to allow time-bombing after a deadline.
         | 
| 229 | 
            +
              * Added skip_until(year, month, day, msg) to allow deferring until a deadline.
         | 
| 230 | 
            +
              * Deprecated Minitest::Guard#maglev?
         | 
| 231 | 
            +
              * Deprecated Minitest::Guard#rubinius?
         | 
| 232 | 
            +
              * Finally added assert_path_exists and refute_path_exists. (deivid-rodriguez)
         | 
| 233 | 
            +
              * Refactored and pulled Assertions#things_to_diff out of #diff. (BurdetteLamar)
         | 
| 234 | 
            +
             | 
| 235 | 
            +
            * 3 bug fixes:
         | 
| 236 | 
            +
             | 
| 237 | 
            +
              * Fix autorun bug that affects fork exit status in tests. (dylanahsmith/jhawthorn)
         | 
| 238 | 
            +
              * Improved documentation for _/value/expect, especially for blocks. (svoop)
         | 
| 239 | 
            +
              * Support new Proc#to_s format. (ko1)
         | 
| 240 | 
            +
             | 
| 241 | 
            +
            === 5.12.2 / 2019-09-28
         | 
| 242 | 
            +
             | 
| 243 | 
            +
            * 1 bug fix:
         | 
| 244 | 
            +
             | 
| 245 | 
            +
              * After chatting w/ @y-yagi and others, decided to lower support to include ruby 2.2.
         | 
| 246 | 
            +
             | 
| 247 | 
            +
            === 5.12.1 / 2019-09-28
         | 
| 248 | 
            +
             | 
| 249 | 
            +
            * 1 minor enhancement:
         | 
| 250 | 
            +
             | 
| 251 | 
            +
              * Added documentation for Reporter classes. (sshaw)
         | 
| 252 | 
            +
             | 
| 253 | 
            +
            * 3 bug fixes:
         | 
| 254 | 
            +
             | 
| 255 | 
            +
              * Avoid using 'match?' to support older ruby versions. (y-yagi)
         | 
| 256 | 
            +
              * Fixed broken link to reference on goodness-of-fit testing. (havenwood)
         | 
| 257 | 
            +
              * Update requirements in readme and Rakefile/hoe spec.
         | 
| 258 | 
            +
             | 
| 259 | 
            +
            === 5.12.0 / 2019-09-22
         | 
| 260 | 
            +
             | 
| 261 | 
            +
            * 8 minor enhancements:
         | 
| 262 | 
            +
             | 
| 263 | 
            +
              * Added a descriptive error if assert_output or assert_raises called without a block. (okuramasafumi)
         | 
| 264 | 
            +
              * Changed mu_pp_for_diff to make having both \n and \\n easier to debug.
         | 
| 265 | 
            +
              * Deprecated $N for specifying number of parallel test runners. Use MT_CPU.
         | 
| 266 | 
            +
              * Deprecated use of global expectations. To be removed from MT6.
         | 
| 267 | 
            +
              * Extended Assertions#mu_pp to encoding validity output for strings to improve diffs.
         | 
| 268 | 
            +
              * Extended Assertions#mu_pp to output encoding and validity if invalid to improve diffs.
         | 
| 269 | 
            +
              * Extended Assertions#mu_pp_for_diff to make escaped newlines more obvious in diffs.
         | 
| 270 | 
            +
              * Fail gracefully when expectation used outside of `it`.
         | 
| 271 | 
            +
             | 
| 272 | 
            +
            * 3 bug fixes:
         | 
| 273 | 
            +
             | 
| 274 | 
            +
              * Check \option[:filter] klass before match. Fixes 2.6 warning. (y-yagi)
         | 
| 275 | 
            +
              * Fixed Assertions#diff from recalculating if set to nil
         | 
| 276 | 
            +
              * Fixed spec section of readme to not use deprecated global expectations. (CheezItMan)
         | 
| 277 | 
            +
             | 
| 1 278 | 
             
            === 5.11.3 / 2018-01-26
         | 
| 2 279 |  | 
| 3 280 | 
             
            * 1 bug fix:
         | 
| @@ -123,7 +400,7 @@ | |
| 123 400 | 
             
            * 2 bug fixes:
         | 
| 124 401 |  | 
| 125 402 | 
             
              * Re-release to refresh gem certificate signing. ugh.
         | 
| 126 | 
            -
              * Fixed hoe/minitest to not augment load path if we're actually testing minitest. | 
| 403 | 
            +
              * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
         | 
| 127 404 |  | 
| 128 405 | 
             
            === 5.9.0 / 2016-05-16
         | 
| 129 406 |  | 
| @@ -147,7 +424,7 @@ | |
| 147 424 | 
             
            * 2 bug fixes:
         | 
| 148 425 |  | 
| 149 426 | 
             
              * Re-release to refresh gem certificate signing. ugh.
         | 
| 150 | 
            -
              * Fixed hoe/minitest to not augment load path if we're actually testing minitest. | 
| 427 | 
            +
              * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
         | 
| 151 428 |  | 
| 152 429 | 
             
            === 5.8.4 / 2016-01-21
         | 
| 153 430 |  | 
| @@ -461,7 +738,7 @@ Minitest 5: | |
| 461 738 | 
             
              * Added Minitest::Benchmark.
         | 
| 462 739 | 
             
                * Your benchmarks need to move to their own subclass.
         | 
| 463 740 | 
             
                * Benchmarks using the spec DSL have to have "Bench" somewhere in their describe.
         | 
| 464 | 
            -
              * MiniTest::Unit.after_tests moved to Minitest. | 
| 741 | 
            +
              * MiniTest::Unit.after_tests moved to Minitest.after_run
         | 
| 465 742 | 
             
              * MiniTest::Unit.autorun is now Minitest.autorun. Just require minitest/autorun pls.
         | 
| 466 743 | 
             
              * Removed ParallelEach#grep since it isn't used anywhere.
         | 
| 467 744 | 
             
              * Renamed Runnable#__name__ to Runnable#name (but uses @NAME internally).
         | 
| @@ -1307,4 +1584,3 @@ back. | |
| 1307 1584 | 
             
            * 1 major enhancement
         | 
| 1308 1585 |  | 
| 1309 1586 | 
             
              * Birthday!
         | 
| 1310 | 
            -
             | 
    
        data/Manifest.txt
    CHANGED
    
    | @@ -9,6 +9,7 @@ lib/minitest.rb | |
| 9 9 | 
             
            lib/minitest/assertions.rb
         | 
| 10 10 | 
             
            lib/minitest/autorun.rb
         | 
| 11 11 | 
             
            lib/minitest/benchmark.rb
         | 
| 12 | 
            +
            lib/minitest/compress.rb
         | 
| 12 13 | 
             
            lib/minitest/expectations.rb
         | 
| 13 14 | 
             
            lib/minitest/hell.rb
         | 
| 14 15 | 
             
            lib/minitest/mock.rb
         | 
| @@ -17,10 +18,13 @@ lib/minitest/pride.rb | |
| 17 18 | 
             
            lib/minitest/pride_plugin.rb
         | 
| 18 19 | 
             
            lib/minitest/spec.rb
         | 
| 19 20 | 
             
            lib/minitest/test.rb
         | 
| 21 | 
            +
            lib/minitest/test_task.rb
         | 
| 20 22 | 
             
            lib/minitest/unit.rb
         | 
| 21 23 | 
             
            test/minitest/metametameta.rb
         | 
| 24 | 
            +
            test/minitest/test_minitest_assertions.rb
         | 
| 22 25 | 
             
            test/minitest/test_minitest_benchmark.rb
         | 
| 23 26 | 
             
            test/minitest/test_minitest_mock.rb
         | 
| 24 27 | 
             
            test/minitest/test_minitest_reporter.rb
         | 
| 25 28 | 
             
            test/minitest/test_minitest_spec.rb
         | 
| 26 29 | 
             
            test/minitest/test_minitest_test.rb
         | 
| 30 | 
            +
            test/minitest/test_minitest_test_task.rb
         | 
    
        data/README.rdoc
    CHANGED
    
    | @@ -1,8 +1,9 @@ | |
| 1 1 | 
             
            = minitest/{test,spec,mock,benchmark}
         | 
| 2 2 |  | 
| 3 | 
            -
            home :: https://github.com/ | 
| 4 | 
            -
            bugs :: https://github.com/ | 
| 5 | 
            -
            rdoc ::  | 
| 3 | 
            +
            home :: https://github.com/minitest/minitest
         | 
| 4 | 
            +
            bugs :: https://github.com/minitest/minitest/issues
         | 
| 5 | 
            +
            rdoc :: https://docs.seattlerb.org/minitest
         | 
| 6 | 
            +
            clog :: https://github.com/minitest/minitest/blob/master/History.rdoc
         | 
| 6 7 | 
             
            vim  :: https://github.com/sunaku/vim-ruby-minitest
         | 
| 7 8 | 
             
            emacs:: https://github.com/arthurnn/minitest-emacs
         | 
| 8 9 |  | 
| @@ -70,6 +71,7 @@ extract-method refactorings still apply. | |
| 70 71 | 
             
            * minitest/mock - a simple and clean mock/stub system.
         | 
| 71 72 | 
             
            * minitest/benchmark - an awesome way to assert your algorithm's performance.
         | 
| 72 73 | 
             
            * minitest/pride - show your pride in testing!
         | 
| 74 | 
            +
            * minitest/test_task - a full-featured and clean rake task generator.
         | 
| 73 75 | 
             
            * Incredibly small and fast runner, but no bells and whistles.
         | 
| 74 76 | 
             
            * Written by squishy human beings. Software can never be perfect. We will all eventually die.
         | 
| 75 77 |  | 
| @@ -126,13 +128,13 @@ Define your tests as methods beginning with +test_+. | |
| 126 128 |  | 
| 127 129 | 
             
                describe "when asked about cheeseburgers" do
         | 
| 128 130 | 
             
                  it "must respond positively" do
         | 
| 129 | 
            -
                    @meme.i_can_has_cheezburger | 
| 131 | 
            +
                    _(@meme.i_can_has_cheezburger?).must_equal "OHAI!"
         | 
| 130 132 | 
             
                  end
         | 
| 131 133 | 
             
                end
         | 
| 132 134 |  | 
| 133 135 | 
             
                describe "when asked about blending possibilities" do
         | 
| 134 136 | 
             
                  it "won't say no" do
         | 
| 135 | 
            -
                    @meme.will_it_blend | 
| 137 | 
            +
                    _(@meme.will_it_blend?).wont_match /^no/i
         | 
| 136 138 | 
             
                  end
         | 
| 137 139 | 
             
                end
         | 
| 138 140 | 
             
              end
         | 
| @@ -186,7 +188,7 @@ Output is tab-delimited to make it easy to paste into a spreadsheet. | |
| 186 188 | 
             
            === Mocks
         | 
| 187 189 |  | 
| 188 190 | 
             
            Mocks and stubs defined using terminology by Fowler & Meszaros at
         | 
| 189 | 
            -
             | 
| 191 | 
            +
            https://www.martinfowler.com/bliki/TestDouble.html:
         | 
| 190 192 |  | 
| 191 193 | 
             
            "Mocks are pre-programmed with expectations which form a specification
         | 
| 192 194 | 
             
            of the calls they are expected to receive. They can throw an exception
         | 
| @@ -220,9 +222,9 @@ verification to ensure they got all the calls they were expecting." | |
| 220 222 | 
             
                end
         | 
| 221 223 | 
             
              end
         | 
| 222 224 |  | 
| 223 | 
            -
             | 
| 225 | 
            +
            ==== Multi-threading and Mocks
         | 
| 224 226 |  | 
| 225 | 
            -
            Minitest mocks do not support multi-threading  | 
| 227 | 
            +
            Minitest mocks do not support multi-threading. If it works, fine, if it doesn't
         | 
| 226 228 | 
             
            you can use regular ruby patterns and facilities like local variables. Here's
         | 
| 227 229 | 
             
            an example of asserting that code inside a thread is run:
         | 
| 228 230 |  | 
| @@ -237,7 +239,7 @@ an example of asserting that code inside a thread is run: | |
| 237 239 | 
             
            === Stubs
         | 
| 238 240 |  | 
| 239 241 | 
             
            Mocks and stubs are defined using terminology by Fowler & Meszaros at
         | 
| 240 | 
            -
             | 
| 242 | 
            +
            https://www.martinfowler.com/bliki/TestDouble.html:
         | 
| 241 243 |  | 
| 242 244 | 
             
            "Stubs provide canned answers to calls made during the test".
         | 
| 243 245 |  | 
| @@ -264,9 +266,8 @@ new non-existing method: | |
| 264 266 |  | 
| 265 267 | 
             
            === Running Your Tests
         | 
| 266 268 |  | 
| 267 | 
            -
            Ideally, you'll use a rake task to run your tests, either | 
| 268 | 
            -
            all at once.  | 
| 269 | 
            -
            tests. BUT! You don't have to:
         | 
| 269 | 
            +
            Ideally, you'll use a rake task to run your tests (see below), either
         | 
| 270 | 
            +
            piecemeal or all at once. BUT! You don't have to:
         | 
| 270 271 |  | 
| 271 272 | 
             
                % ruby -Ilib:test test/minitest/test_minitest_test.rb
         | 
| 272 273 | 
             
                Run options: --seed 37685
         | 
| @@ -294,6 +295,45 @@ provided via plugins. To see them, simply run with +--help+: | |
| 294 295 | 
             
                    -p, --pride                      Pride. Show your testing pride!
         | 
| 295 296 | 
             
                    -a, --autotest                   Connect to autotest server.
         | 
| 296 297 |  | 
| 298 | 
            +
            === Rake Tasks
         | 
| 299 | 
            +
             | 
| 300 | 
            +
            You can set up a rake task to run all your tests by adding this to your Rakefile:
         | 
| 301 | 
            +
             | 
| 302 | 
            +
                require "minitest/test_task"
         | 
| 303 | 
            +
             | 
| 304 | 
            +
                Minitest::TestTask.create # named test, sensible defaults
         | 
| 305 | 
            +
             | 
| 306 | 
            +
                # or more explicitly:
         | 
| 307 | 
            +
             | 
| 308 | 
            +
                Minitest::TestTask.create(:test) do |t|
         | 
| 309 | 
            +
                  t.libs << "test"
         | 
| 310 | 
            +
                  t.libs << "lib"
         | 
| 311 | 
            +
                  t.warning = false
         | 
| 312 | 
            +
                  t.test_globs = ["test/**/*_test.rb"]
         | 
| 313 | 
            +
                end
         | 
| 314 | 
            +
             | 
| 315 | 
            +
                task :default => :test
         | 
| 316 | 
            +
             | 
| 317 | 
            +
            Each of these will generate 4 tasks:
         | 
| 318 | 
            +
             | 
| 319 | 
            +
                rake test          :: Run the test suite.
         | 
| 320 | 
            +
                rake test:cmd      :: Print out the test command.
         | 
| 321 | 
            +
                rake test:isolated :: Show which test files fail when run separately.
         | 
| 322 | 
            +
                rake test:slow     :: Show bottom 25 tests sorted by time.
         | 
| 323 | 
            +
             | 
| 324 | 
            +
            === Rake Task Variables
         | 
| 325 | 
            +
             | 
| 326 | 
            +
            There are a bunch of variables you can supply to rake to modify the run.
         | 
| 327 | 
            +
             | 
| 328 | 
            +
                MT_LIB_EXTRAS :: Extra libs to dynamically override/inject for custom runs.
         | 
| 329 | 
            +
                N             :: -n: Tests to run (string or /regexp/).
         | 
| 330 | 
            +
                X             :: -x: Tests to exclude (string or /regexp/).
         | 
| 331 | 
            +
                A             :: Any extra arguments. Honors shell quoting.
         | 
| 332 | 
            +
                MT_CPU        :: How many threads to use for parallel test runs
         | 
| 333 | 
            +
                SEED          :: -s --seed Sets random seed.
         | 
| 334 | 
            +
                TESTOPTS      :: Deprecated, same as A
         | 
| 335 | 
            +
                FILTER        :: Deprecated, same as A
         | 
| 336 | 
            +
             | 
| 297 337 | 
             
            == Writing Extensions
         | 
| 298 338 |  | 
| 299 339 | 
             
            To define a plugin, add a file named minitest/XXX_plugin.rb to your
         | 
| @@ -364,6 +404,40 @@ Using our example above, here is how we might implement MyCI: | |
| 364 404 |  | 
| 365 405 | 
             
            == FAQ
         | 
| 366 406 |  | 
| 407 | 
            +
            === What versions are compatible with what? Or what versions are supported?
         | 
| 408 | 
            +
             | 
| 409 | 
            +
            Minitest is a dependency of rails, which until fairly recently had an
         | 
| 410 | 
            +
            overzealous backwards compatibility policy. As such, I'm stuck
         | 
| 411 | 
            +
            supporting versions of ruby that are long past EOL. Hopefully I'll be
         | 
| 412 | 
            +
            able to support only current versions of ruby sometime in the near
         | 
| 413 | 
            +
            future.
         | 
| 414 | 
            +
             | 
| 415 | 
            +
            (As of 2023-03-05)
         | 
| 416 | 
            +
             | 
| 417 | 
            +
            Current versions of rails: (https://endoflife.date/rails)
         | 
| 418 | 
            +
             | 
| 419 | 
            +
              | rails | min ruby | rec ruby | minitest | status   |  EOL Date  |
         | 
| 420 | 
            +
              |-------+----------+----------+----------+----------+------------|
         | 
| 421 | 
            +
              |   7.0 | >= 2.7   |      3.1 | >= 5.1   | Current  | 2025-06-01?|
         | 
| 422 | 
            +
              |   6.1 | >= 2.5   |      3.0 | >= 5.1   | Maint    | 2024-06-01?|
         | 
| 423 | 
            +
              |   6.0 | >= 2.5   |      2.6 | >= 5.1   | Security | 2023-06-01 |
         | 
| 424 | 
            +
              |   5.2 | >= 2.2.2 |      2.5 | ~> 5.1   | EOL      | 2022-06-01 |
         | 
| 425 | 
            +
             | 
| 426 | 
            +
            If you want to look at the requirements for a specific version, run:
         | 
| 427 | 
            +
             | 
| 428 | 
            +
                gem spec -r --ruby rails -v 7.0.0
         | 
| 429 | 
            +
             | 
| 430 | 
            +
            Current versions of ruby: (https://endoflife.date/ruby)
         | 
| 431 | 
            +
             | 
| 432 | 
            +
              | ruby | Status  |   EOL Date |
         | 
| 433 | 
            +
              |------+---------+------------|
         | 
| 434 | 
            +
              |  3.2 | Current | 2026-03-31 |
         | 
| 435 | 
            +
              |  3.1 | Maint   | 2025-03-31 |
         | 
| 436 | 
            +
              |  3.0 | Maint   | 2024-03-31 |
         | 
| 437 | 
            +
              |  2.7 | Security| 2023-03-31 |
         | 
| 438 | 
            +
              |  2.6 | EOL     | 2022-03-31 |
         | 
| 439 | 
            +
              |  2.5 | EOL     | 2021-03-31 |
         | 
| 440 | 
            +
             | 
| 367 441 | 
             
            === How to test SimpleDelegates?
         | 
| 368 442 |  | 
| 369 443 | 
             
            The following implementation and test:
         | 
| @@ -379,7 +453,7 @@ The following implementation and test: | |
| 379 453 | 
             
                  end
         | 
| 380 454 |  | 
| 381 455 | 
             
                  it "must respond to work" do
         | 
| 382 | 
            -
                    @worker.must_respond_to :work
         | 
| 456 | 
            +
                    _(@worker).must_respond_to :work
         | 
| 383 457 | 
             
                  end
         | 
| 384 458 | 
             
                end
         | 
| 385 459 |  | 
| @@ -469,6 +543,8 @@ able to require minitest and run your tests. | |
| 469 543 |  | 
| 470 544 | 
             
            == Developing Minitest:
         | 
| 471 545 |  | 
| 546 | 
            +
            Minitest requires {Hoe}[https://rubygems.org/gems/hoe].
         | 
| 547 | 
            +
             | 
| 472 548 | 
             
            === Minitest's own tests require UTF-8 external encoding.
         | 
| 473 549 |  | 
| 474 550 | 
             
            This is a common problem in Windows, where the default external Encoding is
         | 
| @@ -547,6 +623,7 @@ minispec-metadata           :: Metadata for describe/it blocks & CLI tag filter. | |
| 547 623 | 
             
                                           E.g. <tt>it "requires JS driver", js: true do</tt> &
         | 
| 548 624 | 
             
                                           <tt>ruby test.rb --tag js</tt> runs tests tagged :js.
         | 
| 549 625 | 
             
            minispec-rails              :: Minimal support to use Spec style in Rails 5+.
         | 
| 626 | 
            +
            mini-apivore                :: for swagger based automated API testing.
         | 
| 550 627 | 
             
            minitest-around             :: Around block for minitest. An alternative to
         | 
| 551 628 | 
             
                                           setup/teardown dance.
         | 
| 552 629 | 
             
            minitest-assert_errors      :: Adds Minitest assertions to test for errors raised
         | 
| @@ -563,6 +640,7 @@ minitest-capistrano         :: Assertions and expectations for testing | |
| 563 640 | 
             
                                           Capistrano recipes.
         | 
| 564 641 | 
             
            minitest-capybara           :: Capybara matchers support for minitest unit and
         | 
| 565 642 | 
             
                                           spec.
         | 
| 643 | 
            +
            minitest-cc                 :: It provides minimal information about code coverage.
         | 
| 566 644 | 
             
            minitest-chef-handler       :: Run Minitest suites as Chef report handlers
         | 
| 567 645 | 
             
            minitest-ci                 :: CI reporter plugin for Minitest.
         | 
| 568 646 | 
             
            minitest-context            :: Defines contexts for code reuse in Minitest
         | 
| @@ -589,12 +667,14 @@ minitest-firemock           :: Makes your Minitest mocks more resilient. | |
| 589 667 | 
             
            minitest-focus              :: Focus on one test at a time.
         | 
| 590 668 | 
             
            minitest-gcstats            :: A minitest plugin that adds a report of the top
         | 
| 591 669 | 
             
                                           tests by number of objects allocated.
         | 
| 670 | 
            +
            minitest-global_expectations:: Support minitest expectation methods for all objects
         | 
| 592 671 | 
             
            minitest-great_expectations :: Generally useful additions to minitest's
         | 
| 593 672 | 
             
                                           assertions and expectations.
         | 
| 594 673 | 
             
            minitest-growl              :: Test notifier for minitest via growl.
         | 
| 595 674 | 
             
            minitest-happy              :: GLOBALLY ACTIVATE MINITEST PRIDE! RAWR!
         | 
| 596 675 | 
             
            minitest-have_tag           :: Adds Minitest assertions to test for the existence of
         | 
| 597 676 | 
             
                                           HTML tags, including contents, within a provided string.
         | 
| 677 | 
            +
            minitest-heat               :: Reporting that builds a heat map of failure locations
         | 
| 598 678 | 
             
            minitest-hooks              :: Around and before_all/after_all/around_all hooks
         | 
| 599 679 | 
             
            minitest-hyper              :: Pretty, single-page HTML reports for your Minitest runs
         | 
| 600 680 | 
             
            minitest-implicit-subject   :: Implicit declaration of the test subject.
         | 
| @@ -615,6 +695,7 @@ minitest-matchers           :: Adds support for RSpec-style matchers to | |
| 615 695 | 
             
            minitest-matchers_vaccine   :: Adds assertions that adhere to the matcher spec,
         | 
| 616 696 | 
             
                                           but without any expectation infections.
         | 
| 617 697 | 
             
            minitest-metadata           :: Annotate tests with metadata (key-value).
         | 
| 698 | 
            +
            minitest-mock_expectations  :: Provides method call assertions for minitest.
         | 
| 618 699 | 
             
            minitest-mongoid            :: Mongoid assertion matchers for Minitest.
         | 
| 619 700 | 
             
            minitest-must_not           :: Provides must_not as an alias for wont in
         | 
| 620 701 | 
             
                                           Minitest.
         | 
| @@ -658,16 +739,23 @@ minitest-stub-const         :: Stub constants for the duration of a block. | |
| 658 739 | 
             
            minitest-tags               :: Add tags for minitest.
         | 
| 659 740 | 
             
            minitest-unordered          :: Adds a new assertion to minitest for checking the
         | 
| 660 741 | 
             
                                           contents of a collection, ignoring element order.
         | 
| 661 | 
            -
            minitest-vcr                :: Automatic cassette  | 
| 742 | 
            +
            minitest-vcr                :: Automatic cassette management with Minitest::Spec
         | 
| 662 743 | 
             
                                           and VCR.
         | 
| 744 | 
            +
            minitest_log                :: Adds structured logging, data explication, and verdicts.
         | 
| 663 745 | 
             
            minitest_owrapper           :: Get tests results as a TestResult object.
         | 
| 664 746 | 
             
            minitest_should             :: Shoulda style syntax for minitest test::unit.
         | 
| 665 747 | 
             
            minitest_tu_shim            :: Bridges between test/unit and minitest.
         | 
| 666 748 | 
             
            mongoid-minitest            :: Minitest matchers for Mongoid.
         | 
| 749 | 
            +
            mutant-minitest             :: Minitest integration for mutant.
         | 
| 667 750 | 
             
            pry-rescue                  :: A pry plugin w/ minitest support. See
         | 
| 668 751 | 
             
                                           pry-rescue/minitest.rb.
         | 
| 752 | 
            +
            rematch                     :: Declutter your test files from large hardcoded data
         | 
| 753 | 
            +
                                           and update them automatically when your code changes.
         | 
| 669 754 | 
             
            rspec2minitest              :: Easily translate any RSpec matchers to Minitest
         | 
| 670 755 | 
             
                                           assertions and expectations.
         | 
| 756 | 
            +
            stubberry                   :: Multiple stubbing 'berries', sweet and useful 
         | 
| 757 | 
            +
                                           stub helpers and assertions. ( stub_must, 
         | 
| 758 | 
            +
                                           assert_method_called, stubbing ORM objects by id )
         | 
| 671 759 |  | 
| 672 760 | 
             
            == Unknown Extensions:
         | 
| 673 761 |  | 
| @@ -693,12 +781,11 @@ Authors... Please send me a pull request with a description of your minitest ext | |
| 693 781 |  | 
| 694 782 | 
             
            == Minitest related goods
         | 
| 695 783 |  | 
| 696 | 
            -
            * minitest/pride fabric:  | 
| 784 | 
            +
            * minitest/pride fabric: https://www.spoonflower.com/fabric/3928730-again-by-katie_allen
         | 
| 697 785 |  | 
| 698 786 | 
             
            == REQUIREMENTS:
         | 
| 699 787 |  | 
| 700 | 
            -
            * Ruby  | 
| 701 | 
            -
            * NOTE: 1.8 and 1.9 will be dropped in minitest 6+.
         | 
| 788 | 
            +
            * Ruby 2.3+. No magic is involved. I hope.
         | 
| 702 789 |  | 
| 703 790 | 
             
            == INSTALL:
         | 
| 704 791 |  | 
    
        data/Rakefile
    CHANGED
    
    | @@ -2,6 +2,7 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            require "rubygems"
         | 
| 4 4 | 
             
            require "hoe"
         | 
| 5 | 
            +
            $:.unshift "lib" # to pick up lib/minitest/test_task.rb when minitest not installed
         | 
| 5 6 |  | 
| 6 7 | 
             
            Hoe.plugin :seattlerb
         | 
| 7 8 | 
             
            Hoe.plugin :rdoc
         | 
| @@ -11,21 +12,7 @@ Hoe.spec "minitest" do | |
| 11 12 |  | 
| 12 13 | 
             
              license "MIT"
         | 
| 13 14 |  | 
| 14 | 
            -
               | 
| 15 | 
            -
              #
         | 
| 16 | 
            -
              #   self.post_install_message = <<-"EOM"
         | 
| 17 | 
            -
              # NOTE: minitest 5 will be the last in the minitest family to support
         | 
| 18 | 
            -
              #       ruby 1.8 and 1.9 (and maybe 2.0?). If you need to keep using 1.8
         | 
| 19 | 
            -
              #       or 1.9, you need to pin your dependency to minitest with
         | 
| 20 | 
            -
              #       something like "~> 5.0".
         | 
| 21 | 
            -
              #
         | 
| 22 | 
            -
              #       Further, minitest 6 will be dropping the following:
         | 
| 23 | 
            -
              #
         | 
| 24 | 
            -
              #       + MiniTest (it's been Minitest for *years*)
         | 
| 25 | 
            -
              #       + MiniTest::Unit
         | 
| 26 | 
            -
              #       + MiniTest::Unit::TestCase
         | 
| 27 | 
            -
              #       + assert_send (unless you argue for it well)
         | 
| 28 | 
            -
              #   EOM
         | 
| 15 | 
            +
              require_ruby_version [">= 2.6", "< 4.0"]
         | 
| 29 16 | 
             
            end
         | 
| 30 17 |  | 
| 31 18 | 
             
            desc "Find missing expectations"
         | 
| @@ -35,7 +22,7 @@ task :specs do | |
| 35 22 | 
             
              require "minitest/spec"
         | 
| 36 23 |  | 
| 37 24 | 
             
              pos_prefix, neg_prefix = "must", "wont"
         | 
| 38 | 
            -
              skip_re = /^(must|wont)$|wont_(throw)|must_(block|not?_|nothing|raise$)/x
         | 
| 25 | 
            +
              skip_re = /^(must|wont)$|wont_(throw)|must_(block|not?_|nothing|send|raise$)/x
         | 
| 39 26 | 
             
              dont_flip_re = /(must|wont)_(include|respond_to)/
         | 
| 40 27 |  | 
| 41 28 | 
             
              map = {
         | 
| @@ -46,6 +33,8 @@ task :specs do | |
| 46 33 | 
             
                /_includes/                            => "_include",
         | 
| 47 34 | 
             
                /(must|wont)_(.*_of|nil|silent|empty)/ => '\1_be_\2',
         | 
| 48 35 | 
             
                /must_raises/                          => "must_raise",
         | 
| 36 | 
            +
                /(must|wont)_predicate/                => '\1_be',
         | 
| 37 | 
            +
                /(must|wont)_path_exists/              => 'path_\1_exist',
         | 
| 49 38 | 
             
              }
         | 
| 50 39 |  | 
| 51 40 | 
             
              expectations = Minitest::Expectations.public_instance_methods.map(&:to_s)
         | 
    
        data/lib/hoe/minitest.rb
    CHANGED