pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/ruby-test-unit devel/ruby-test-unit: update to 3...
details: https://anonhg.NetBSD.org/pkgsrc/rev/197ca16f7c38
branches: trunk
changeset: 388217:197ca16f7c38
user: taca <taca%pkgsrc.org@localhost>
date: Sun Dec 02 06:37:54 2018 +0000
description:
devel/ruby-test-unit: update to 3.2.9
## 3.2.9 - 2018-12-01 {#version-3-2-9}
### Improvements
* Added support for data generation by method. `data_#{test_name}`
is called to generate data for `test_name` test.
* Added support for data matrix generation.
Example:
```ruby
data(:a, [0, 1, 2])
data(:b, [:x, :y])
def test_data(data)
end
```
This example generates the following data matrix:
* label: `"a: 0, b: :x"`, data: `{a: 0, b: :x}`
* label: `"a: 0, b: :y"`, data: `{a: 0, b: :y}`
* label: `"a: 1, b: :x"`, data: `{a: 1, b: :x}`
* label: `"a: 1, b: :y"`, data: `{a: 1, b: :y}`
* label: `"a: 2, b: :x"`, data: `{a: 2, b: :x}`
* label: `"a: 2, b: :y"`, data: `{a: 2, b: :y}`
* Added `Test::Unit::TestCase#data` that returns the current data.
* Added support for using test method that doesn't have no
parameters as data driven test.
Example:
```ruby
data("label", :value)
def test_data # Available since this release
p data # :value
end
```
* Added support for `:keep` option to `Test::Unit::TestCase.data`.
* Added support for `:group` option to
`Test::Unit::TestCase.data`. It's useful to generate multiple data
matrix groups.
```ruby
# Group1
data(:a, [0, 1, 2], group: :g1)
data(:b, [:x, :y], group: :g1)
# Group2
data(:a, [:x, :y], group: :g2)
data(:c, [-1, -2], group: :g2)
def test_data(data)
end
```
This example generates the following data matrix:
* label: `"group: :g1, a: 0, b: :x"`, data: `{a: 0, b: :x}`
* label: `"group: :g1, a: 0, b: :y"`, data: `{a: 0, b: :y}`
* label: `"group: :g1, a: 1, b: :x"`, data: `{a: 1, b: :x}`
* label: `"group: :g1, a: 1, b: :y"`, data: `{a: 1, b: :y}`
* label: `"group: :g1, a: 2, b: :x"`, data: `{a: 2, b: :x}`
* label: `"group: :g1, a: 2, b: :y"`, data: `{a: 2, b: :y}`
* label: `"group: :g2, a: :x, b: -1"`, data: `{a: :x, b: -1}`
* label: `"group: :g2, a: :x, b: -2"`, data: `{a: :x, b: -2}`
* label: `"group: :g2, a: :y, b: -1"`, data: `{a: :y, b: -1}`
* label: `"group: :g2, a: :y, b: -2"`, data: `{a: :y, b: -2}`
diffstat:
devel/ruby-test-unit/Makefile | 4 ++--
devel/ruby-test-unit/PLIST | 3 ++-
devel/ruby-test-unit/distinfo | 10 +++++-----
3 files changed, 9 insertions(+), 8 deletions(-)
diffs (44 lines):
diff -r 8bc5f041ce29 -r 197ca16f7c38 devel/ruby-test-unit/Makefile
--- a/devel/ruby-test-unit/Makefile Sun Dec 02 06:37:28 2018 +0000
+++ b/devel/ruby-test-unit/Makefile Sun Dec 02 06:37:54 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.32 2018/09/23 15:20:26 taca Exp $
+# $NetBSD: Makefile,v 1.33 2018/12/02 06:37:54 taca Exp $
-DISTNAME= test-unit-3.2.8
+DISTNAME= test-unit-3.2.9
CATEGORIES= devel
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
diff -r 8bc5f041ce29 -r 197ca16f7c38 devel/ruby-test-unit/PLIST
--- a/devel/ruby-test-unit/PLIST Sun Dec 02 06:37:28 2018 +0000
+++ b/devel/ruby-test-unit/PLIST Sun Dec 02 06:37:54 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.13 2017/06/05 14:17:43 taca Exp $
+@comment $NetBSD: PLIST,v 1.14 2018/12/02 06:37:54 taca Exp $
${GEM_HOME}/cache/${GEM_NAME}.gem
${GEM_LIBDIR}/COPYING
${GEM_LIBDIR}/GPL
@@ -26,6 +26,7 @@
${GEM_LIBDIR}/lib/test/unit/collector/xml.rb
${GEM_LIBDIR}/lib/test/unit/color-scheme.rb
${GEM_LIBDIR}/lib/test/unit/color.rb
+${GEM_LIBDIR}/lib/test/unit/data-sets.rb
${GEM_LIBDIR}/lib/test/unit/data.rb
${GEM_LIBDIR}/lib/test/unit/diff.rb
${GEM_LIBDIR}/lib/test/unit/error.rb
diff -r 8bc5f041ce29 -r 197ca16f7c38 devel/ruby-test-unit/distinfo
--- a/devel/ruby-test-unit/distinfo Sun Dec 02 06:37:28 2018 +0000
+++ b/devel/ruby-test-unit/distinfo Sun Dec 02 06:37:54 2018 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.27 2018/09/23 15:20:26 taca Exp $
+$NetBSD: distinfo,v 1.28 2018/12/02 06:37:54 taca Exp $
-SHA1 (test-unit-3.2.8.gem) = c1ea44ee4d3b59c45b8a52cf11cd523fd200915c
-RMD160 (test-unit-3.2.8.gem) = d4296e10aa1ac37c877b1149b9485e4885ca2807
-SHA512 (test-unit-3.2.8.gem) = b7ed21744118036a997525251af2520158282ca19e99ebccaa7180361a112e0cdafaf570c36126a6b74b8480405c67aaa5394e06465145583964defb68abeb9c
-Size (test-unit-3.2.8.gem) = 129536 bytes
+SHA1 (test-unit-3.2.9.gem) = dc94dd3777650574537e37cf7096cbf24086da1e
+RMD160 (test-unit-3.2.9.gem) = ffae563df2c9d0df187b1a06173010c7e267993c
+SHA512 (test-unit-3.2.9.gem) = 1c2b127e3522f4561770b9f9e7b547a18b9f2df4120ea408a8f4064be393a26138998068c1484569f35b33cfddc8a7251e237d90703f8e1a023c14875f7e2ae5
+Size (test-unit-3.2.9.gem) = 131584 bytes
Home |
Main Index |
Thread Index |
Old Index