minitest-sub_test_case 0.1.0 → 0.1.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 +5 -5
- data/.travis.yml +4 -3
- data/CHANGELOG.md +5 -0
- data/README.md +46 -0
- data/lib/minitest/sub_test_case/version.rb +1 -1
- data/lib/minitest/sub_test_case.rb +5 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8c8c92ec2b7e01aba07ba2ad6c1a6bb8c157bf27a15e2146705f22e6a455ad64
|
4
|
+
data.tar.gz: 82f1d910047d5022f19e158752371d50c74d6ebc8799e73d5ea2fefc2f4bb8d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f7c39855f3010468ef33b416b8d62ec16c7b04b16a229d5170d4c52542111d7b52d93990727291eaa8528ba8c77144468ce23ef1db7caf57813a888da7a021b
|
7
|
+
data.tar.gz: 057e21f3d05a373ae394e1de50c56a6e415b50f1cfe992919b31cc2982803ee7444030943d0b0b51a8cd485f0719993cde4f9451af9707be01a2e1a2e1c648f0
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -43,6 +43,52 @@ class UserTest < Minitest::Test
|
|
43
43
|
end
|
44
44
|
```
|
45
45
|
|
46
|
+
You can also use it with the Rails test class.
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
require 'test_helper'
|
50
|
+
|
51
|
+
class PageTest < ActiveSupport::TestCase
|
52
|
+
test 'recently updated pages group by date' do
|
53
|
+
...
|
54
|
+
end
|
55
|
+
|
56
|
+
test 'find page when use valid title' do
|
57
|
+
...
|
58
|
+
end
|
59
|
+
|
60
|
+
sub_test_case 'validation' do
|
61
|
+
test 'validate error when set invalid title' do
|
62
|
+
...
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
```
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
require 'test_helper'
|
70
|
+
|
71
|
+
class BooksTest < ActionDispatch::IntegrationTest
|
72
|
+
setup do
|
73
|
+
...
|
74
|
+
end
|
75
|
+
|
76
|
+
sub_test_case('create book with author') do
|
77
|
+
setup do
|
78
|
+
...
|
79
|
+
end
|
80
|
+
|
81
|
+
test "fail" do
|
82
|
+
...
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
test "success" do
|
87
|
+
...
|
88
|
+
end
|
89
|
+
end
|
90
|
+
```
|
91
|
+
|
46
92
|
|
47
93
|
## Development
|
48
94
|
|
@@ -15,6 +15,11 @@ module Minitest
|
|
15
15
|
super(re) - parent_test_case.methods_matching(re)
|
16
16
|
end
|
17
17
|
|
18
|
+
define_singleton_method(:name) do
|
19
|
+
class_name
|
20
|
+
end
|
21
|
+
|
22
|
+
# NOTE: `location` method needs only for support of Minitest < 5.11.
|
18
23
|
define_method(:location) do
|
19
24
|
loc = " [#{self.failure.location}]" unless passed? or error?
|
20
25
|
"#{self.class.class_name}##{self.name}#{loc}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-sub_test_case
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Yaginuma
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -61,6 +61,7 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
63
|
- ".travis.yml"
|
64
|
+
- CHANGELOG.md
|
64
65
|
- CODE_OF_CONDUCT.md
|
65
66
|
- Gemfile
|
66
67
|
- LICENSE.txt
|
@@ -91,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
92
|
version: '0'
|
92
93
|
requirements: []
|
93
94
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.7.6
|
95
96
|
signing_key:
|
96
97
|
specification_version: 4
|
97
98
|
summary: minitest-sub_test_case makes sub_test_case available in minitest/test.
|