minitest 5.16.2 → 5.16.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 +7 -0
- data/README.rdoc +2 -1
- data/lib/minitest/test.rb +2 -2
- data/lib/minitest/test_task.rb +1 -1
- data/lib/minitest.rb +1 -1
- data/test/minitest/test_minitest_test.rb +43 -0
- data.tar.gz.sig +2 -2
- metadata +2 -2
- 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: 9c5a4db9f495b34c86f2c39eef6b6d424b22d8d9e6a86038bf0ff84c1c20c975
|
4
|
+
data.tar.gz: b8a1b6cb226d14c6972460bec05ec610d05acdfa0edcffe19bf51e8220486206
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6505a8f386da89263a005ba8eef3f81053e7e666a54ec03abd8f71e06c290ebf318df4f7728e420e3f40fab55ffe1a57824ec435286c89864ea830d330d6b028
|
7
|
+
data.tar.gz: 5b8bbba7d8565026e64da1d3af31a5aa342c3d063acd75de9661bc09fb142f4a469e9febf44daf2764d4fb33021d993a27bd936200efded501158b23c299989e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -641,6 +641,7 @@ minitest-capistrano :: Assertions and expectations for testing
|
|
641
641
|
Capistrano recipes.
|
642
642
|
minitest-capybara :: Capybara matchers support for minitest unit and
|
643
643
|
spec.
|
644
|
+
minitest-cc :: It provides minimal information about code coverage.
|
644
645
|
minitest-chef-handler :: Run Minitest suites as Chef report handlers
|
645
646
|
minitest-ci :: CI reporter plugin for Minitest.
|
646
647
|
minitest-context :: Defines contexts for code reuse in Minitest
|
@@ -739,7 +740,7 @@ minitest-stub-const :: Stub constants for the duration of a block.
|
|
739
740
|
minitest-tags :: Add tags for minitest.
|
740
741
|
minitest-unordered :: Adds a new assertion to minitest for checking the
|
741
742
|
contents of a collection, ignoring element order.
|
742
|
-
minitest-vcr :: Automatic cassette
|
743
|
+
minitest-vcr :: Automatic cassette management with Minitest::Spec
|
743
744
|
and VCR.
|
744
745
|
minitest_log :: Adds structured logging, data explication, and verdicts.
|
745
746
|
minitest_owrapper :: Get tests results as a TestResult object.
|
data/lib/minitest/test.rb
CHANGED
@@ -204,7 +204,7 @@ module Minitest
|
|
204
204
|
def sanitize_exception e # :nodoc:
|
205
205
|
Marshal.dump e
|
206
206
|
e # good: use as-is
|
207
|
-
rescue
|
207
|
+
rescue
|
208
208
|
neuter_exception e
|
209
209
|
end
|
210
210
|
|
@@ -213,7 +213,7 @@ module Minitest
|
|
213
213
|
msg = e.message.dup
|
214
214
|
|
215
215
|
new_exception e.class, msg, bt # e.class can be a problem...
|
216
|
-
rescue
|
216
|
+
rescue
|
217
217
|
msg.prepend "Neutered Exception #{e.class}: "
|
218
218
|
|
219
219
|
new_exception RuntimeError, msg, bt, true # but if this raises, we die
|
data/lib/minitest/test_task.rb
CHANGED
data/lib/minitest.rb
CHANGED
@@ -942,6 +942,49 @@ class TestMinitestRunnable < Minitest::Test
|
|
942
942
|
assert_equal @tc.failures, over_the_wire.failures
|
943
943
|
assert_equal @tc.klass, over_the_wire.klass
|
944
944
|
end
|
945
|
+
|
946
|
+
def test_spec_marshal_with_exception__worse_error_typeerror
|
947
|
+
worse_error_klass = Class.new(StandardError) do
|
948
|
+
# problem #1: anonymous subclass can'tmarshal, fails sanitize_exception
|
949
|
+
def initialize(record = nil)
|
950
|
+
|
951
|
+
super(record.first)
|
952
|
+
end
|
953
|
+
end
|
954
|
+
|
955
|
+
klass = describe("whatever") {
|
956
|
+
it("raises with NoMethodError") {
|
957
|
+
# problem #2: instantiated with a NON-string argument
|
958
|
+
#
|
959
|
+
# problem #3: arg responds to #first, but it becomes message
|
960
|
+
# which gets passed back in via new_exception
|
961
|
+
# that passes a string to worse_error_klass#initialize
|
962
|
+
# which calls first on it, which raises NoMethodError
|
963
|
+
raise worse_error_klass.new(["boom"])
|
964
|
+
}
|
965
|
+
}
|
966
|
+
|
967
|
+
rm = klass.runnable_methods.first
|
968
|
+
|
969
|
+
# Run the test
|
970
|
+
@tc = klass.new(rm).run
|
971
|
+
|
972
|
+
assert_kind_of Minitest::Result, @tc
|
973
|
+
assert_instance_of Minitest::UnexpectedError, @tc.failure
|
974
|
+
|
975
|
+
msg = @tc.failure.error.message.gsub(/0x[A-Fa-f0-9]+/, "0xXXX")
|
976
|
+
|
977
|
+
assert_equal "Neutered Exception #<Class:0xXXX>: boom", msg
|
978
|
+
|
979
|
+
# Pass it over the wire
|
980
|
+
over_the_wire = Marshal.load Marshal.dump @tc
|
981
|
+
|
982
|
+
assert_equal @tc.time, over_the_wire.time
|
983
|
+
assert_equal @tc.name, over_the_wire.name
|
984
|
+
assert_equal @tc.assertions, over_the_wire.assertions
|
985
|
+
assert_equal @tc.failures, over_the_wire.failures
|
986
|
+
assert_equal @tc.klass, over_the_wire.klass
|
987
|
+
end
|
945
988
|
end
|
946
989
|
|
947
990
|
class TestMinitestTest < TestMinitestRunnable
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
��#3)�~<Lp1���=�ܞb���qG���,]�x,_�.f��� ��|Wqn�g�:����ۊ���-5
|
2
|
+
�3WP�fG&�����TU�5���tj�Ͷ�AoRvn�ܿ����h��������V�ڌ�Xh3�Gp��g���|\%d�L�Y#��D�e�=p�={����t�,I���L�����i���2-��$�~�z����]6F�M{t/֦yϭ
|
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.16.
|
4
|
+
version: 5.16.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
JFmxn4h9YO/pVdB962BdBNNDia0kgIjI3ENnkLq0dKpYU3+F3KhEuTksLO0L6X/V
|
30
30
|
YsuyUzsMz6GQA4khyaMgKNSD
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2022-
|
32
|
+
date: 2022-08-17 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rdoc
|
metadata.gz.sig
CHANGED
Binary file
|