minitest 5.12.0 → 5.12.1
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.tar.gz.sig +0 -0
- data/History.rdoc +12 -0
- data/README.rdoc +7 -4
- data/Rakefile +1 -15
- data/lib/minitest.rb +58 -7
- data/lib/minitest/assertions.rb +2 -2
- data/lib/minitest/benchmark.rb +2 -2
- metadata +4 -4
- 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: f45ca8b284609e6c73accd4bd7d71144ecb79433ee5039246e2ed83abc87bafe
|
4
|
+
data.tar.gz: 0f67c6fbd863252ed2421d4c15b018a009d3f53a798c4c882d0135780fda239b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7d542986e130f4f3288453677aee162e749f94ee26bfec890822d2619908ee983e15990107659c8abfdbb8ec323a318c4d4da8e16d19fb44238db60ded410a7
|
7
|
+
data.tar.gz: 28ec3b0bf85fd91947a19bcfb02c7c09fdb1b2976f139f320c66fc74a04e8316dd1dbb1f75c47206bedb63ad5f0a77da048ef09ff0377c5aca533fd3164ddb14
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
=== 5.12.1 / 2019-09-28
|
2
|
+
|
3
|
+
* 1 minor enhancement:
|
4
|
+
|
5
|
+
* Added documentation for Reporter classes. (sshaw)
|
6
|
+
|
7
|
+
* 3 bug fixes:
|
8
|
+
|
9
|
+
* Avoid using 'match?' to support older ruby versions. (y-yagi)
|
10
|
+
* Fixed broken link to reference on goodness-of-fit testing. (havenwood)
|
11
|
+
* Update requirements in readme and Rakefile/hoe spec.
|
12
|
+
|
1
13
|
=== 5.12.0 / 2019-09-22
|
2
14
|
|
3
15
|
* 8 minor enhancements:
|
data/README.rdoc
CHANGED
@@ -220,9 +220,9 @@ verification to ensure they got all the calls they were expecting."
|
|
220
220
|
end
|
221
221
|
end
|
222
222
|
|
223
|
-
|
223
|
+
==== Multi-threading and Mocks
|
224
224
|
|
225
|
-
Minitest mocks do not support multi-threading
|
225
|
+
Minitest mocks do not support multi-threading. If it works, fine, if it doesn't
|
226
226
|
you can use regular ruby patterns and facilities like local variables. Here's
|
227
227
|
an example of asserting that code inside a thread is run:
|
228
228
|
|
@@ -481,6 +481,8 @@ able to require minitest and run your tests.
|
|
481
481
|
|
482
482
|
== Developing Minitest:
|
483
483
|
|
484
|
+
Minitest requires {Hoe}[https://rubygems.org/gems/hoe].
|
485
|
+
|
484
486
|
=== Minitest's own tests require UTF-8 external encoding.
|
485
487
|
|
486
488
|
This is a common problem in Windows, where the default external Encoding is
|
@@ -559,6 +561,7 @@ minispec-metadata :: Metadata for describe/it blocks & CLI tag filter.
|
|
559
561
|
E.g. <tt>it "requires JS driver", js: true do</tt> &
|
560
562
|
<tt>ruby test.rb --tag js</tt> runs tests tagged :js.
|
561
563
|
minispec-rails :: Minimal support to use Spec style in Rails 5+.
|
564
|
+
mini-apivore :: for swagger based automated API testing.
|
562
565
|
minitest-around :: Around block for minitest. An alternative to
|
563
566
|
setup/teardown dance.
|
564
567
|
minitest-assert_errors :: Adds Minitest assertions to test for errors raised
|
@@ -601,6 +604,7 @@ minitest-firemock :: Makes your Minitest mocks more resilient.
|
|
601
604
|
minitest-focus :: Focus on one test at a time.
|
602
605
|
minitest-gcstats :: A minitest plugin that adds a report of the top
|
603
606
|
tests by number of objects allocated.
|
607
|
+
minitest-global_expectations:: Support minitest expectation methods for all objects
|
604
608
|
minitest-great_expectations :: Generally useful additions to minitest's
|
605
609
|
assertions and expectations.
|
606
610
|
minitest-growl :: Test notifier for minitest via growl.
|
@@ -711,8 +715,7 @@ Authors... Please send me a pull request with a description of your minitest ext
|
|
711
715
|
|
712
716
|
== REQUIREMENTS:
|
713
717
|
|
714
|
-
* Ruby
|
715
|
-
* NOTE: 1.8 and 1.9 will be dropped in minitest 6+.
|
718
|
+
* Ruby 2.3+. No magic is involved. I hope.
|
716
719
|
|
717
720
|
== INSTALL:
|
718
721
|
|
data/Rakefile
CHANGED
@@ -11,21 +11,7 @@ Hoe.spec "minitest" do
|
|
11
11
|
|
12
12
|
license "MIT"
|
13
13
|
|
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
|
14
|
+
require_ruby_version "~> 2.3"
|
29
15
|
end
|
30
16
|
|
31
17
|
desc "Find missing expectations"
|
data/lib/minitest.rb
CHANGED
@@ -8,7 +8,7 @@ require "stringio"
|
|
8
8
|
# :include: README.rdoc
|
9
9
|
|
10
10
|
module Minitest
|
11
|
-
VERSION = "5.12.
|
11
|
+
VERSION = "5.12.1" # :nodoc:
|
12
12
|
ENCS = "".respond_to? :encoding # :nodoc:
|
13
13
|
|
14
14
|
@@installed_at_exit ||= false
|
@@ -425,7 +425,8 @@ module Minitest
|
|
425
425
|
|
426
426
|
##
|
427
427
|
# Returns a single character string to print based on the result
|
428
|
-
# of the run.
|
428
|
+
# of the run. One of <tt>"."</tt>, <tt>"F"</tt>,
|
429
|
+
# <tt>"E"</tt> or <tt>"S"</tt>.
|
429
430
|
|
430
431
|
def result_code
|
431
432
|
raise NotImplementedError, "subclass responsibility"
|
@@ -563,8 +564,10 @@ module Minitest
|
|
563
564
|
end
|
564
565
|
|
565
566
|
##
|
566
|
-
#
|
567
|
-
# result
|
567
|
+
# Output and record the result of the test. Call
|
568
|
+
# {result#result_code}[rdoc-ref:Runnable#result_code] to get the
|
569
|
+
# result character string. Stores the result of the run if the run
|
570
|
+
# did not pass.
|
568
571
|
|
569
572
|
def record result
|
570
573
|
end
|
@@ -631,18 +634,63 @@ module Minitest
|
|
631
634
|
#
|
632
635
|
# If you want to create an entirely different type of output (eg,
|
633
636
|
# CI, HTML, etc), this is the place to start.
|
637
|
+
#
|
638
|
+
# Example:
|
639
|
+
#
|
640
|
+
# class JenkinsCIReporter < StatisticsReporter
|
641
|
+
# def report
|
642
|
+
# super # Needed to calculate some statistics
|
643
|
+
#
|
644
|
+
# print "<testsuite "
|
645
|
+
# print "tests='#{count}' "
|
646
|
+
# print "failures='#{failures}' "
|
647
|
+
# # Remaining XML...
|
648
|
+
# end
|
649
|
+
# end
|
634
650
|
|
635
651
|
class StatisticsReporter < Reporter
|
636
|
-
|
652
|
+
##
|
653
|
+
# Total number of assertions.
|
654
|
+
|
637
655
|
attr_accessor :assertions
|
656
|
+
|
657
|
+
##
|
658
|
+
# Total number of test cases.
|
659
|
+
|
638
660
|
attr_accessor :count
|
661
|
+
|
662
|
+
##
|
663
|
+
# An +Array+ of test cases that failed or were skipped.
|
664
|
+
|
639
665
|
attr_accessor :results
|
666
|
+
|
667
|
+
##
|
668
|
+
# Time the test run started. If available, the monotonic clock is
|
669
|
+
# used and this is a +Float+, otherwise it's an instance of
|
670
|
+
# +Time+.
|
671
|
+
|
640
672
|
attr_accessor :start_time
|
673
|
+
|
674
|
+
##
|
675
|
+
# Test run time. If available, the monotonic clock is used and
|
676
|
+
# this is a +Float+, otherwise it's an instance of +Time+.
|
677
|
+
|
641
678
|
attr_accessor :total_time
|
679
|
+
|
680
|
+
##
|
681
|
+
# Total number of tests that failed.
|
682
|
+
|
642
683
|
attr_accessor :failures
|
684
|
+
|
685
|
+
##
|
686
|
+
# Total number of tests that erred.
|
687
|
+
|
643
688
|
attr_accessor :errors
|
689
|
+
|
690
|
+
##
|
691
|
+
# Total number of tests that where skipped.
|
692
|
+
|
644
693
|
attr_accessor :skips
|
645
|
-
# :startdoc:
|
646
694
|
|
647
695
|
def initialize io = $stdout, options = {} # :nodoc:
|
648
696
|
super
|
@@ -672,7 +720,10 @@ module Minitest
|
|
672
720
|
results << result if not result.passed? or result.skipped?
|
673
721
|
end
|
674
722
|
|
675
|
-
|
723
|
+
##
|
724
|
+
# Report on the tracked statistics.
|
725
|
+
|
726
|
+
def report
|
676
727
|
aggregate = results.group_by { |r| r.failure.class }
|
677
728
|
aggregate.default = [] # dumb. group_by should provide this
|
678
729
|
|
data/lib/minitest/assertions.rb
CHANGED
@@ -136,8 +136,8 @@ module Minitest
|
|
136
136
|
str = mu_pp obj
|
137
137
|
|
138
138
|
# both '\n' & '\\n' (_after_ mu_pp (aka inspect))
|
139
|
-
single = str.match
|
140
|
-
double = str.match
|
139
|
+
single = !!str.match(/(?<!\\|^)\\n/)
|
140
|
+
double = !!str.match(/(?<=\\|^)\\n/)
|
141
141
|
|
142
142
|
process =
|
143
143
|
if single ^ double then
|
data/lib/minitest/benchmark.rb
CHANGED
@@ -109,8 +109,8 @@ module Minitest
|
|
109
109
|
# is applied against the slope itself. As such, you probably want
|
110
110
|
# to tighten it from the default.
|
111
111
|
#
|
112
|
-
# See
|
113
|
-
# more details.
|
112
|
+
# See https://www.graphpad.com/guides/prism/8/curve-fitting/reg_intepretingnonlinr2.htm
|
113
|
+
# for more details.
|
114
114
|
#
|
115
115
|
# Fit is calculated by #fit_linear.
|
116
116
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.12.
|
4
|
+
version: 5.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
Em82dBUFsipwMLCYj39kcyHWAxyl6Ae1Cn9r/ItVBCxoeFdrHjfavnrIEoXUt4bU
|
30
30
|
UfBugfLD19bu3nvL+zTAGx/U
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2019-09-
|
32
|
+
date: 2019-09-28 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rdoc
|
@@ -167,9 +167,9 @@ require_paths:
|
|
167
167
|
- lib
|
168
168
|
required_ruby_version: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
|
-
- - "
|
170
|
+
- - "~>"
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: '
|
172
|
+
version: '2.3'
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
requirements:
|
175
175
|
- - ">="
|
metadata.gz.sig
CHANGED
Binary file
|