minitest-sub_test_case 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e9d7749576e3064f1cc645ba1ecde972fecde0a9
4
- data.tar.gz: bb8769b0be9aa774acbb72dd8134cd1019944bde
2
+ SHA256:
3
+ metadata.gz: 8c8c92ec2b7e01aba07ba2ad6c1a6bb8c157bf27a15e2146705f22e6a455ad64
4
+ data.tar.gz: 82f1d910047d5022f19e158752371d50c74d6ebc8799e73d5ea2fefc2f4bb8d5
5
5
  SHA512:
6
- metadata.gz: 758a629ece6f3c251de420c88e262774ef641f179d6b7f8a0cd13fb22e62855e21b0c554e6adeba0b2f7477c22f70afaf3925e3e81c08a499afa0e4702d15ee3
7
- data.tar.gz: a9c12d42d36cee044fbb734088e6ea0f32c1815f0049086eeb9a6ec6e939ab3ff03201f92acf8824e82bcb205bf615872a2cea091be79a4db35419c0f61b498a
6
+ metadata.gz: 1f7c39855f3010468ef33b416b8d62ec16c7b04b16a229d5170d4c52542111d7b52d93990727291eaa8528ba8c77144468ce23ef1db7caf57813a888da7a021b
7
+ data.tar.gz: 057e21f3d05a373ae394e1de50c56a6e415b50f1cfe992919b31cc2982803ee7444030943d0b0b51a8cd485f0719993cde4f9451af9707be01a2e1a2e1c648f0
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.6
4
- - 2.3.3
5
- - 2.4.0-rc1
3
+ - 2.2.8
4
+ - 2.3.5
5
+ - 2.4.2
6
+ - 2.5.0
6
7
  before_install: gem install bundler
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [v0.1.1 (2018-03-21)](https://github.com/y-yagi/minitest-sub_test_case/tree/HEAD)
2
+
3
+ **Implemented enhancements:**
4
+
5
+ * Show class name correctly when used with Minitest v5.11. [\#4](https://github.com/y-yagi/minitest-sub_test_case/pull/4)
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
 
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module SubTestCase
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -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.0
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: 2016-12-22 00:00:00.000000000 Z
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.5.1
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.