[DRE-commits] [ruby-minitest] 01/03: Imported Upstream version 5.2.3
Cédric Boutillier
boutil at moszumanska.debian.org
Sat Feb 15 22:52:10 UTC 2014
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to annotated tag debian/5.2.3-1
in repository ruby-minitest.
commit ca2893cfcd6c509009f328ca58d38e7cc1e6e3f0
Author: Cédric Boutillier <boutil at debian.org>
Date: Sat Feb 15 12:11:44 2014 +0100
Imported Upstream version 5.2.3
---
History.txt | 16 ++++++++++++++++
README.txt | 4 ++++
checksums.yaml.gz | Bin 267 -> 269 bytes
checksums.yaml.gz.sig | Bin 256 -> 256 bytes
data.tar.gz.sig | 3 ++-
lib/minitest.rb | 2 +-
lib/minitest/benchmark.rb | 6 +++---
lib/minitest/spec.rb | 6 +++++-
metadata.gz.sig | Bin 256 -> 256 bytes
metadata.yml | 12 ++++++------
test/minitest/test_minitest_benchmark.rb | 7 +++++++
test/minitest/test_minitest_spec.rb | 20 +++++++++++++++++---
12 files changed, 61 insertions(+), 15 deletions(-)
diff --git a/History.txt b/History.txt
index 565af9f..ce71174 100644
--- a/History.txt
+++ b/History.txt
@@ -1,3 +1,19 @@
+=== 5.2.3 / 2014-02-10
+
+* 1 bug fix:
+
+ * Fixed Spec#let check to allow overriding of other lets. (mvz)
+
+=== 5.2.2 / 2014-01-22
+
+* 1 minor enhancement:
+
+ * Spec#let raises ArgumentError if you override _any_ instance method (except subject). (rynr)
+
+* 1 bug fix:
+
+ * Fixed up benchmark spec doco and added a test to demonstrate. (bhenderson)
+
=== 5.2.1 / 2014-01-07
* 1 bug fix:
diff --git a/README.txt b/README.txt
index 652ff45..1a567fa 100644
--- a/README.txt
+++ b/README.txt
@@ -397,6 +397,7 @@ minitest-context :: Defines contexts for code reuse in MiniTest
minitest-debugger :: Wraps assert so failed assertions drop into
the ruby debugger.
minitest-display :: Patches MiniTest to allow for an easily configurable output.
+minitest-documentation :: Minimal documentation format inspired by rspec's
minitest-doc_reporter :: Detailed output inspired by rspec's documentation
format.
minitest-emoji :: Print out emoji for your test passes, fails, and skips.
@@ -424,6 +425,7 @@ minitest-predicates :: Adds support for .predicate? methods
minitest-rails :: MiniTest integration for Rails 3.x
minitest-rails-capybara :: Capybara integration for MiniTest::Rails
minitest-reporters :: Create customizable MiniTest output formats
+minitest-rspec_mocks :: Use RSpec Mocks with Minitest
minitest-should_syntax :: RSpec-style +x.should == y+ assertions for MiniTest
minitest-shouldify :: Adding all manner of shoulds to MiniTest (bad idea)
minitest-spec-context :: Provides rspec-ish context method to MiniTest::Spec
@@ -433,12 +435,14 @@ minitest-spec-rails :: Drop in MiniTest::Spec superclass for ActiveSuppo
minitest-stub_any_instance :: Stub any instance of a method on the given class for the duration of a block
minitest-stub-const :: Stub constants for the duration of a block
minitest-tags :: add tags for minitest
+minitest-vcr :: Automatic cassette managment with MiniTest::Spec and VCR
minitest-wscolor :: Yet another test colorizer.
minitest_owrapper :: Get tests results as a TestResult object.
minitest_should :: Shoulda style syntax for minitest test::unit.
minitest_tu_shim :: minitest_tu_shim bridges between test/unit and minitest.
mongoid-minitest :: MiniTest matchers for Mongoid.
pry-rescue :: A pry plugin w/ minitest support. See pry-rescue/minitest.rb.
+rspec2minitest :: Easily translate any RSpec matchers to MiniTest assertions and expectations.
== Unknown Extensions:
diff --git a/checksums.yaml.gz b/checksums.yaml.gz
index 573741d..256a438 100644
Binary files a/checksums.yaml.gz and b/checksums.yaml.gz differ
diff --git a/checksums.yaml.gz.sig b/checksums.yaml.gz.sig
index 6cc30ce..549b9f6 100644
Binary files a/checksums.yaml.gz.sig and b/checksums.yaml.gz.sig differ
diff --git a/data.tar.gz.sig b/data.tar.gz.sig
index d78f9a0..8029b30 100644
--- a/data.tar.gz.sig
+++ b/data.tar.gz.sig
@@ -1 +1,2 @@
-
_/ ͇����a羯��m������pY���4�m��7O�{%���T�q�X,>��!#���m�P_5�߸9�e-�<<�P��/r�=��G��im���U{��F�(�n�_v�1�o��{��������?��4��sy�����YO�ڷ���G�C�8+>�|$7�
R,���}�69�C�.2�����z����D\\vڲ=U�2��<?o� �߸$;�r��D�x�R6�z)f,hB8�d�1�M#��(
݁_1��H
\ No newline at end of file
+�{
&mlH����:�e��x gm1��w���fF��"j��×PW��Լ�>�-��!r��
+���C�~l
�M�ĒMWb=�{z�t|��s ���=����ɏ�T~m�-������T
a�����G��0���[�=�#!��*��t��Ʉ�X]G�(l)��%_g�H���3eɗ4�BK�Z(�
*Ǟ��2�:���;_j��o�����
~Zz�h�S��<�)-�܈;
Ԍd~�9,d�x��iJ("r�P����&�
\ No newline at end of file
diff --git a/lib/minitest.rb b/lib/minitest.rb
index 44479c0..1acd201 100644
--- a/lib/minitest.rb
+++ b/lib/minitest.rb
@@ -7,7 +7,7 @@ require "minitest/parallel"
# :include: README.txt
module Minitest
- VERSION = "5.2.1" # :nodoc:
+ VERSION = "5.2.3" # :nodoc:
@@installed_at_exit ||= false
@@after_run = []
diff --git a/lib/minitest/benchmark.rb b/lib/minitest/benchmark.rb
index 675940a..ea827f0 100644
--- a/lib/minitest/benchmark.rb
+++ b/lib/minitest/benchmark.rb
@@ -376,7 +376,7 @@ module Minitest
##
# Create a benchmark that verifies that the performance is linear.
#
- # describe "my class" do
+ # describe "my class Bench" do
# bench_performance_linear "fast_algorithm", 0.9999 do |n|
# @obj.fast_algorithm(n)
# end
@@ -391,7 +391,7 @@ module Minitest
##
# Create a benchmark that verifies that the performance is constant.
#
- # describe "my class" do
+ # describe "my class Bench" do
# bench_performance_constant "zoom_algorithm!" do |n|
# @obj.zoom_algorithm!(n)
# end
@@ -406,7 +406,7 @@ module Minitest
##
# Create a benchmark that verifies that the performance is exponential.
#
- # describe "my class" do
+ # describe "my class Bench" do
# bench_performance_exponential "algorithm" do |n|
# @obj.algorithm(n)
# end
diff --git a/lib/minitest/spec.rb b/lib/minitest/spec.rb
index df6d3cc..86f0217 100644
--- a/lib/minitest/spec.rb
+++ b/lib/minitest/spec.rb
@@ -223,7 +223,11 @@ class Minitest::Spec < Minitest::Test
# Why use let instead of def? I honestly don't know.
def let name, &block
- raise ArgumentError, 'name cannot begin with "test"' if name.to_s =~ /\Atest/
+ name = name.to_s
+ raise ArgumentError, 'name cannot begin with "test"' if name =~ /\Atest/
+ raise ArgumentError, "##{name} cannot be overridden" if
+ (Minitest::Spec.instance_methods.map(&:to_s) - %w[subject]).include? name
+
define_method name do
@_memoized ||= {}
@_memoized.fetch(name) { |k| @_memoized[k] = instance_eval(&block) }
diff --git a/metadata.gz.sig b/metadata.gz.sig
index 65a2daf..7864d74 100644
Binary files a/metadata.gz.sig and b/metadata.gz.sig differ
diff --git a/metadata.yml b/metadata.yml
index 981662d..1cdb795 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: minitest
version: !ruby/object:Gem::Version
- version: 5.2.1
+ version: 5.2.3
platform: ruby
authors:
- Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
xx3n58i0lQkBE1EpKE0lFu/y
-----END CERTIFICATE-----
-date: 2014-01-08 00:00:00.000000000 Z
+date: 2014-02-11 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rdoc
@@ -51,14 +51,14 @@ dependencies:
requirements:
- - ~>
- !ruby/object:Gem::Version
- version: '3.7'
+ version: '3.9'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - ~>
- !ruby/object:Gem::Version
- version: '3.7'
+ version: '3.9'
description: |-
minitest provides a complete suite of testing facilities supporting
TDD, BDD, mocking, and benchmarking.
@@ -123,6 +123,7 @@ extra_rdoc_files:
- README.txt
files:
- .autotest
+- .gemtest
- History.txt
- Manifest.txt
- README.txt
@@ -148,7 +149,6 @@ files:
- test/minitest/test_minitest_reporter.rb
- test/minitest/test_minitest_spec.rb
- test/minitest/test_minitest_unit.rb
-- .gemtest
homepage: https://github.com/seattlerb/minitest
licenses:
- MIT
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
version: '0'
requirements: []
rubyforge_project: minitest
-rubygems_version: 2.1.10
+rubygems_version: 2.2.1
signing_key:
specification_version: 4
summary: minitest provides a complete suite of testing facilities supporting TDD,
diff --git a/test/minitest/test_minitest_benchmark.rb b/test/minitest/test_minitest_benchmark.rb
index 0a05a54..ba19020 100644
--- a/test/minitest/test_minitest_benchmark.rb
+++ b/test/minitest/test_minitest_benchmark.rb
@@ -128,3 +128,10 @@ class TestMinitestBenchmark < Minitest::Test
assert_in_delta exp_b, b
end
end
+
+describe "my class Bench" do
+ klass = self
+ it "should provide bench methods" do
+ klass.must_respond_to :bench
+ end
+end
diff --git a/test/minitest/test_minitest_spec.rb b/test/minitest/test_minitest_spec.rb
index b2cdb24..bd45b93 100755
--- a/test/minitest/test_minitest_spec.rb
+++ b/test/minitest/test_minitest_spec.rb
@@ -553,9 +553,23 @@ describe Minitest::Spec, :let do
end
it 'raises an error if the name begins with "test"' do
- describe "let" do
- proc { let(:test_value) { true } }.must_raise ArgumentError
- end
+ proc { self.class.let(:test_value) { true } }.must_raise ArgumentError
+ end
+
+ it 'raises an error if the name shadows a normal instance method' do
+ proc { self.class.let(:message) { true } }.must_raise ArgumentError
+ end
+
+ it "doesn't raise an error if it is just another let" do
+ proc do
+ describe :outer do
+ let(:bar)
+ describe :inner do
+ let(:bar)
+ end
+ end
+ :good
+ end.call.must_equal :good
end
it 'procs come after dont_flip' do
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-minitest.git
More information about the Pkg-ruby-extras-commits
mailing list