minitest 5.2.1 → 5.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f17df265f92a1188b05a7e6b43ea5fb746990470
4
- data.tar.gz: 83da546658edabc983acef75e6996198b559a965
3
+ metadata.gz: 0298ef5657934b0ce29bce4d32eb327726391cd0
4
+ data.tar.gz: 41eb94c7d812fd5e771c108e11b5a26ca3e33075
5
5
  SHA512:
6
- metadata.gz: fdbaf9e81b2873045002c9cfa23939fea6c43b245b2e7faa096f6933e3e42a155333020270447e2e4b75733f2a0ea1e60c401035132b41fa79009f879828a2a2
7
- data.tar.gz: 79ad360b68c218778b61a04813f8f85d22f2083d586495d6af5c54f9ec01265776f70dfdd87ce3519e0e5f7ef07ad49181feca0c74c727eb6ce9116272039ad5
6
+ metadata.gz: 158a3553a7678e92a735da2c116f496522e17cb6ebd770efade0b9c4f9b10b0496963abec21cc1159aa12cc1808c28495e888cb6e184d399573a9c037ed26897
7
+ data.tar.gz: b95653c4c750fe3f0547bbeb07ddfe919d151d1e9cde12a011a04cb5c679b5aa651700b8fdc767a6fe2889477333e9ca6d1dafc043ba03850c96ed63b48326ed
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,13 @@
1
+ === 5.2.2 / 2014-01-22
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Spec#let raises ArgumentError if you override _any_ instance method (except subject). (rynr)
6
+
7
+ * 1 bug fix:
8
+
9
+ * Fixed up benchmark spec doco and added a test to demonstrate. (bhenderson)
10
+
1
11
  === 5.2.1 / 2014-01-07
2
12
 
3
13
  * 1 bug fix:
data/README.txt CHANGED
@@ -397,6 +397,7 @@ minitest-context :: Defines contexts for code reuse in MiniTest
397
397
  minitest-debugger :: Wraps assert so failed assertions drop into
398
398
  the ruby debugger.
399
399
  minitest-display :: Patches MiniTest to allow for an easily configurable output.
400
+ minitest-documentation :: Minimal documentation format inspired by rspec's
400
401
  minitest-doc_reporter :: Detailed output inspired by rspec's documentation
401
402
  format.
402
403
  minitest-emoji :: Print out emoji for your test passes, fails, and skips.
@@ -433,12 +434,14 @@ minitest-spec-rails :: Drop in MiniTest::Spec superclass for ActiveSuppo
433
434
  minitest-stub_any_instance :: Stub any instance of a method on the given class for the duration of a block
434
435
  minitest-stub-const :: Stub constants for the duration of a block
435
436
  minitest-tags :: add tags for minitest
437
+ minitest-vcr :: Automatic cassette managment with MiniTest::Spec and VCR
436
438
  minitest-wscolor :: Yet another test colorizer.
437
439
  minitest_owrapper :: Get tests results as a TestResult object.
438
440
  minitest_should :: Shoulda style syntax for minitest test::unit.
439
441
  minitest_tu_shim :: minitest_tu_shim bridges between test/unit and minitest.
440
442
  mongoid-minitest :: MiniTest matchers for Mongoid.
441
443
  pry-rescue :: A pry plugin w/ minitest support. See pry-rescue/minitest.rb.
444
+ rspec2minitest :: Easily translate any RSpec matchers to MiniTest assertions and expectations.
442
445
 
443
446
  == Unknown Extensions:
444
447
 
@@ -7,7 +7,7 @@ require "minitest/parallel"
7
7
  # :include: README.txt
8
8
 
9
9
  module Minitest
10
- VERSION = "5.2.1" # :nodoc:
10
+ VERSION = "5.2.2" # :nodoc:
11
11
 
12
12
  @@installed_at_exit ||= false
13
13
  @@after_run = []
@@ -376,7 +376,7 @@ module Minitest
376
376
  ##
377
377
  # Create a benchmark that verifies that the performance is linear.
378
378
  #
379
- # describe "my class" do
379
+ # describe "my class Bench" do
380
380
  # bench_performance_linear "fast_algorithm", 0.9999 do |n|
381
381
  # @obj.fast_algorithm(n)
382
382
  # end
@@ -391,7 +391,7 @@ module Minitest
391
391
  ##
392
392
  # Create a benchmark that verifies that the performance is constant.
393
393
  #
394
- # describe "my class" do
394
+ # describe "my class Bench" do
395
395
  # bench_performance_constant "zoom_algorithm!" do |n|
396
396
  # @obj.zoom_algorithm!(n)
397
397
  # end
@@ -406,7 +406,7 @@ module Minitest
406
406
  ##
407
407
  # Create a benchmark that verifies that the performance is exponential.
408
408
  #
409
- # describe "my class" do
409
+ # describe "my class Bench" do
410
410
  # bench_performance_exponential "algorithm" do |n|
411
411
  # @obj.algorithm(n)
412
412
  # end
@@ -223,7 +223,11 @@ class Minitest::Spec < Minitest::Test
223
223
  # Why use let instead of def? I honestly don't know.
224
224
 
225
225
  def let name, &block
226
- raise ArgumentError, 'name cannot begin with "test"' if name.to_s =~ /\Atest/
226
+ name = name.to_s
227
+ raise ArgumentError, 'name cannot begin with "test"' if name =~ /\Atest/
228
+ raise ArgumentError, "##{name} cannot be overwritten" if
229
+ (instance_methods.map(&:to_s) - %w[subject]).include? name
230
+
227
231
  define_method name do
228
232
  @_memoized ||= {}
229
233
  @_memoized.fetch(name) { |k| @_memoized[k] = instance_eval(&block) }
@@ -128,3 +128,10 @@ class TestMinitestBenchmark < Minitest::Test
128
128
  assert_in_delta exp_b, b
129
129
  end
130
130
  end
131
+
132
+ describe "my class Bench" do
133
+ klass = self
134
+ it "should provide bench methods" do
135
+ klass.must_respond_to :bench
136
+ end
137
+ end
@@ -553,9 +553,11 @@ describe Minitest::Spec, :let do
553
553
  end
554
554
 
555
555
  it 'raises an error if the name begins with "test"' do
556
- describe "let" do
557
- proc { let(:test_value) { true } }.must_raise ArgumentError
558
- end
556
+ proc { self.class.let(:test_value) { true } }.must_raise ArgumentError
557
+ end
558
+
559
+ it 'raises an error if the name shadows a normal instance method' do
560
+ proc { self.class.let(:message) { true } }.must_raise ArgumentError
559
561
  end
560
562
 
561
563
  it 'procs come after dont_flip' do
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.2.1
4
+ version: 5.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
30
30
  xx3n58i0lQkBE1EpKE0lFu/y
31
31
  -----END CERTIFICATE-----
32
- date: 2014-01-08 00:00:00.000000000 Z
32
+ date: 2014-01-22 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rdoc
@@ -51,14 +51,14 @@ dependencies:
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: '3.7'
54
+ version: '3.8'
55
55
  type: :development
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: '3.7'
61
+ version: '3.8'
62
62
  description: |-
63
63
  minitest provides a complete suite of testing facilities supporting
64
64
  TDD, BDD, mocking, and benchmarking.
@@ -123,6 +123,7 @@ extra_rdoc_files:
123
123
  - README.txt
124
124
  files:
125
125
  - .autotest
126
+ - .gemtest
126
127
  - History.txt
127
128
  - Manifest.txt
128
129
  - README.txt
@@ -148,7 +149,6 @@ files:
148
149
  - test/minitest/test_minitest_reporter.rb
149
150
  - test/minitest/test_minitest_spec.rb
150
151
  - test/minitest/test_minitest_unit.rb
151
- - .gemtest
152
152
  homepage: https://github.com/seattlerb/minitest
153
153
  licenses:
154
154
  - MIT
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  version: '0'
172
172
  requirements: []
173
173
  rubyforge_project: minitest
174
- rubygems_version: 2.1.10
174
+ rubygems_version: 2.2.1
175
175
  signing_key:
176
176
  specification_version: 4
177
177
  summary: minitest provides a complete suite of testing facilities supporting TDD,
metadata.gz.sig CHANGED
@@ -1,2 +1,5 @@
1
- O?k�+؝��P�׬�$�7�iۜ��Z���}F�_�y����
2
- ���"��)a�`q N52�l���S�LM���Ao��#eG����5��I0Ax�q�#�ڻpd���a ��7&aTU����q��=S�f�Z�pc�Zf��ֻ��#3k�>�]%/�M�T�~�Jf̋������~��Ջhhp����P���:[ �cu��e�}^!G'Gkɧ�LC*�ˍ���m�W^�$%i�[�����溠
1
+ EU����?���U�Ћ�
2
+ �;_�S�YH9Fg٢T|�r��|�9K䗢v��ǹ�kI�׸��4�@�t8��p蕥�
3
+ ���eg� �I)O����U�<��X� e�x
4
+ ��:N3�7d�B�VH��o�∕>Ƽ}��^��8���'�
5
+ `��9/B�:/�;�ƗR���<�*Q (�a�,@gd�B�T�G�